Use @vercel/cli-auth for auth token reading and OAuth refresh - #1043

Merged
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh
Feb 13, 2026
Merged

Use @vercel/cli-auth for auth token reading and OAuth refresh#1043
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Replace the manual auth.json reading logic in the CLI with the @vercel/cli-auth package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.

Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.

Replace the manual auth.json reading logic in the CLI with the `@vercel/cli-auth` package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.
Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.
@changeset-bot

changeset-botBot commented Feb 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8dbf9a9

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

This PR includes changesets to release 14 packages
NameType
@workflow/cliPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

@TooTallNate
TooTallNate marked this pull request as ready for review February 13, 2026 19:19
CopilotAI review requested due to automatic review settings February 13, 2026 19:19
@vercel

vercelBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

@TooTallNate
TooTallNate requested review from a team and removed request for CopilotFebruary 13, 2026 19:20
@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.032s (+14.9% 🔺)1.005s (~)0.974s101.00x
💻 LocalNitro0.033s (+2.2%)1.005s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.035s1.005s0.970s101.11x
🌐 RedisNext.js (Turbopack)0.043s1.005s0.961s101.37x
🌐 MongoDBNext.js (Turbopack)0.074s1.007s0.932s102.34x
🐘 PostgresExpress0.137s (+49.3% 🔺)1.011s (~)0.874s104.31x
🐘 PostgresNitro0.340s (+61.4% 🔺)1.012s (~)0.672s1010.73x
🐘 PostgresNext.js (Turbopack)0.436s1.009s0.573s1013.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.564s (-24.9% 🟢)2.009s (-1.4%)1.444s101.00x
▲ VercelNext.js (Turbopack)0.600s (-13.1% 🟢)2.053s (-4.1%)1.453s101.06x
▲ VercelNitro0.612s (+2.0%)2.052s (+2.9%)1.440s101.08x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.086s2.005s0.919s101.00x
💻 LocalExpress1.105s (+2.4%)2.006s (~)0.901s101.02x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.02x
🌐 RedisNext.js (Turbopack)1.109s2.006s0.897s101.02x
🌐 MongoDBNext.js (Turbopack)1.296s2.006s0.710s101.19x
🐘 PostgresNext.js (Turbopack)1.815s2.012s0.197s101.67x
🐘 PostgresNitro2.391s (-1.9%)3.014s (~)0.624s102.20x
🐘 PostgresExpress2.460s (~)3.014s (~)0.554s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.377s (-1.1%)3.225s (+2.5%)0.848s101.00x
▲ VercelNext.js (Turbopack)2.484s (-4.4%)3.426s (~)0.942s101.04x
▲ VercelNitro3.138s (+26.6% 🔺)4.160s (+19.3% 🔺)1.022s101.32x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.645s11.021s0.376s31.00x
🌐 RedisNext.js (Turbopack)10.722s11.022s0.300s31.01x
💻 LocalNitro10.831s (~)11.022s (~)0.191s31.02x
💻 LocalExpress10.832s (+2.3%)11.023s (~)0.191s31.02x
🌐 MongoDBNext.js (Turbopack)12.197s13.013s0.816s31.15x
🐘 PostgresNext.js (Turbopack)14.800s15.041s0.241s21.39x
🐘 PostgresNitro20.247s (~)21.059s (~)0.812s21.90x
🐘 PostgresExpress20.317s (~)21.059s (~)0.742s21.91x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.813s (-3.0%)19.224s (-1.9%)1.411s21.00x
▲ VercelExpress18.124s (-1.3%)19.409s (-1.9%)1.285s21.02x
▲ VercelNext.js (Turbopack)22.613s (+19.3% 🔺)24.038s (+18.8% 🔺)1.425s21.27x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.857s27.050s0.193s31.00x
💻 LocalNext.js (Turbopack)26.923s27.053s0.130s31.00x
💻 LocalExpress27.497s (+2.3%)28.051s (+3.7%)0.554s31.02x
💻 LocalNitro27.532s (~)28.052s (~)0.519s31.03x
🌐 MongoDBNext.js (Turbopack)30.454s31.026s0.571s21.13x
🐘 PostgresNext.js (Turbopack)37.396s38.085s0.689s21.39x
🐘 PostgresExpress50.339s (~)51.127s (+1.0%)0.788s21.87x
🐘 PostgresNitro50.541s (~)51.128s (~)0.588s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)51.638s (+13.8% 🔺)52.494s (+13.6% 🔺)0.856s21.00x
▲ VercelExpress53.536s (+19.5% 🔺)54.278s (+17.8% 🔺)0.742s21.04x
▲ VercelNitro55.613s (+26.3% 🔺)56.634s (+24.7% 🔺)1.021s21.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.454s55.097s0.643s21.00x
💻 LocalNext.js (Turbopack)56.008s56.107s0.099s21.03x
💻 LocalExpress57.304s (+2.3%)58.098s (+3.6%)0.794s21.05x
💻 LocalNitro57.494s (~)58.106s (~)0.612s21.06x
🌐 MongoDBNext.js (Turbopack)60.847s61.065s0.218s21.12x
🐘 PostgresNext.js (Turbopack)71.530s72.161s0.631s21.31x
🐘 PostgresNitro100.228s (~)100.234s (-1.0%)0.006s11.84x
🐘 PostgresExpress100.245s (~)101.244s (+1.0%)0.999s11.84x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.956s (+2.0%)92.604s (+1.0%)0.648s11.00x
▲ VercelNext.js (Turbopack)97.319s (+5.3% 🔺)99.055s (+6.1% 🔺)1.736s11.06x
▲ VercelExpress105.381s (+17.3% 🔺)106.071s (+16.4% 🔺)0.690s11.15x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.243s2.006s0.763s151.00x
💻 LocalNext.js (Turbopack)1.387s2.005s0.618s151.12x
💻 LocalExpress1.411s (+2.9%)2.006s (~)0.595s151.13x
💻 LocalNitro1.438s (+1.8%)2.006s (~)0.568s151.16x
🐘 PostgresNext.js (Turbopack)2.038s2.297s0.259s141.64x
🌐 MongoDBNext.js (Turbopack)2.137s3.007s0.870s101.72x
🐘 PostgresExpress2.294s (+2.7%)3.015s (~)0.721s101.84x
🐘 PostgresNitro2.309s (-4.4%)3.014s (~)0.705s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.812s (+9.3% 🔺)3.766s (+10.0% 🔺)0.954s81.00x
▲ VercelExpress2.869s (+11.7% 🔺)3.963s (+14.6% 🔺)1.094s81.02x
▲ VercelNext.js (Turbopack)3.053s (-0.7%)3.991s (-3.9%)0.938s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.404s3.007s0.603s101.00x
🌐 RedisNext.js (Turbopack)2.475s3.007s0.532s101.03x
💻 LocalExpress2.592s (+10.4% 🔺)3.007s (~)0.416s101.08x
💻 LocalNitro2.694s (+2.9%)3.008s (~)0.314s101.12x
🌐 MongoDBNext.js (Turbopack)4.678s5.176s0.498s61.95x
🐘 PostgresExpress8.735s (-0.5%)9.032s (-2.8%)0.297s43.63x
🐘 PostgresNitro9.251s (-3.1%)9.787s (-2.5%)0.537s43.85x
🐘 PostgresNext.js (Turbopack)10.773s11.036s0.263s34.48x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.707s (-33.0% 🟢)3.539s (-33.9% 🟢)0.832s91.00x
▲ VercelNext.js (Turbopack)2.980s (+8.6% 🔺)3.991s (+9.8% 🔺)1.010s81.10x
▲ VercelExpress3.179s (+8.9% 🔺)4.159s (+6.4% 🔺)0.981s81.17x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.080s4.867s0.786s71.00x
💻 LocalNext.js (Turbopack)6.763s7.215s0.452s51.66x
💻 LocalExpress7.457s (+15.1% 🔺)8.016s (+14.3% 🔺)0.559s41.83x
💻 LocalNitro7.814s (+5.0% 🔺)8.271s (+3.1%)0.456s41.92x
🌐 MongoDBNext.js (Turbopack)9.892s10.346s0.454s32.42x
🐘 PostgresNitro47.939s (+4.4%)48.145s (+4.4%)0.206s111.75x
🐘 PostgresExpress49.134s (+4.8%)50.148s (+6.4% 🔺)1.014s112.04x
🐘 PostgresNext.js (Turbopack)50.848s51.123s0.275s112.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.480s (+59.1% 🔺)7.709s (+49.5% 🔺)1.229s51.00x
▲ VercelExpress7.002s (+92.1% 🔺)8.127s (+74.4% 🔺)1.125s41.08x
▲ VercelNext.js (Turbopack)9.671s (+131.0% 🔺)10.844s (+107.7% 🔺)1.172s31.49x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.262s2.006s0.744s151.00x
💻 LocalNext.js (Turbopack)1.421s2.004s0.583s151.13x
💻 LocalNitro1.422s (+1.2%)2.005s (~)0.583s151.13x
💻 LocalExpress1.424s (+3.8%)2.005s (~)0.581s151.13x
🐘 PostgresNitro2.029s (+12.2% 🔺)2.397s (~)0.368s131.61x
🐘 PostgresExpress2.049s (-6.0% 🟢)2.924s (+6.7% 🔺)0.875s111.62x
🐘 PostgresNext.js (Turbopack)2.153s2.830s0.678s111.71x
🌐 MongoDBNext.js (Turbopack)2.172s3.008s0.836s101.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.393s (-2.3%)3.369s (-3.4%)0.977s91.00x
▲ VercelNitro2.671s (+11.6% 🔺)3.622s (+7.4% 🔺)0.951s91.12x
▲ VercelExpress3.523s (+21.1% 🔺)4.331s (+13.5% 🔺)0.807s81.47x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.457s3.007s0.551s101.00x
🌐 RedisNext.js (Turbopack)2.494s3.008s0.514s101.02x
💻 LocalExpress2.738s (+10.3% 🔺)3.007s (~)0.269s101.11x
💻 LocalNitro2.796s (+3.7%)3.009s (~)0.213s101.14x
🌐 MongoDBNext.js (Turbopack)4.673s5.176s0.503s61.90x
🐘 PostgresExpress8.599s (-30.0% 🟢)9.278s (-25.0% 🟢)0.679s43.50x
🐘 PostgresNitro10.123s (-11.0% 🟢)10.699s (-11.1% 🟢)0.577s34.12x
🐘 PostgresNext.js (Turbopack)12.685s13.369s0.684s35.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.463s (-17.8% 🟢)3.257s (-14.2% 🟢)0.794s101.00x
▲ VercelNitro2.514s (+3.1%)3.472s (+5.6% 🔺)0.957s91.02x
▲ VercelNext.js (Turbopack)3.549s (+22.9% 🔺)4.411s (+14.9% 🔺)0.863s71.44x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.108s4.868s0.760s71.00x
💻 LocalNext.js (Turbopack)7.195s7.613s0.418s51.75x
💻 LocalExpress7.955s (+9.6% 🔺)8.770s (+9.4% 🔺)0.815s41.94x
💻 LocalNitro8.409s (+5.9% 🔺)9.022s (+9.1% 🔺)0.614s42.05x
🌐 MongoDBNext.js (Turbopack)9.893s10.347s0.455s32.41x
🐘 PostgresExpress46.892s (-4.8%)47.127s (-6.0% 🟢)0.235s111.41x
🐘 PostgresNitro48.666s (-0.9%)49.118s (-2.0%)0.452s111.85x
🐘 PostgresNext.js (Turbopack)54.890s55.134s0.244s113.36x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.362s (-25.5% 🟢)6.455s (-24.5% 🟢)1.093s51.00x
▲ VercelNext.js (Turbopack)6.379s (-11.7% 🟢)7.613s (-11.1% 🟢)1.234s51.19x
▲ VercelExpress7.040s (+61.0% 🔺)8.169s (+49.1% 🔺)1.129s41.31x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.131s1.001s0.010s1.016s0.885s101.00x
🌐 RedisNext.js (Turbopack)0.144s1.000s0.001s1.007s0.863s101.10x
💻 LocalExpress0.172s (+49.6% 🔺)1.002s (~)0.011s (-1.9%)1.015s (~)0.843s101.31x
💻 LocalNitro0.177s (+2.0%)1.003s (~)0.011s (+1.9%)1.017s (~)0.840s101.35x
🌐 MongoDBNext.js (Turbopack)0.483s0.965s0.001s1.008s0.525s103.68x
🐘 PostgresNext.js (Turbopack)0.697s0.860s0.001s1.010s0.313s105.30x
🐘 PostgresNitro2.335s (-4.7%)2.709s (+4.6%)0.001s (~)3.015s (~)0.681s1017.77x
🐘 PostgresExpress2.351s (+2.6%)2.693s (-2.1%)0.001s (-7.1% 🟢)3.015s (~)0.664s1017.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.927s (-9.8% 🟢)2.645s (~)0.216s (-14.7% 🟢)3.413s (-0.9%)1.486s101.00x
▲ VercelExpress2.045s (-6.0% 🟢)2.711s (-2.9%)0.150s (-46.1% 🟢)3.455s (-6.1% 🟢)1.410s101.06x
▲ VercelNext.js (Turbopack)2.120s (-10.3% 🟢)2.769s (+4.0%)0.166s (-38.3% 🟢)3.524s (-1.9%)1.404s101.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)💻 Local6/12
Nitro💻 Local9/12
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

@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production501038539
✅ 💻 Local Development520068588
✅ 📦 Local Production520068588
✅ 🐘 Local Postgres520068588
✅ 🪟 Windows460349
❌ 🌍 Community Worlds105429156
✅ 📋 Other126021147
Total2338422752655

❌ Failed Tests

🌍 Community Worlds (42 failed)

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • 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
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4504
✅ example4504
✅ express4504
✅ fastify4504
✅ hono4504
✅ nextjs-turbopack4801
✅ nextjs-webpack4801
✅ nitro4504
✅ nuxt4504
✅ sveltekit4504
✅ vite4504
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4603
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4603
✅ redis-dev300
✅ redis4603
✅ turso-dev300
❌ turso4423
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4207
✅ e2e-local-postgres-nest-stable4207
✅ e2e-local-prod-nest-stable4207

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces manual authentication file reading with the @vercel/cli-auth package, adding automatic OAuth token refresh functionality. Previously, the CLI would read the auth token from disk without any refresh logic, causing API calls to fail when tokens expired. Now, getAuthToken() automatically checks token expiry and refreshes expired tokens using stored refresh tokens.

Changes:

  • Integrated @vercel/cli-auth package (v0.0.1) for credential management and OAuth refresh
  • Refactored authentication logic to support automatic token refresh before expiry
  • Simplified error messages by removing references to manual vercel env pull commands

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdded @vercel/cli-auth@0.0.1 and its dependencies (async-listen, open@8.4.0)
packages/cli/package.jsonAdded @vercel/cli-auth as a dependency
packages/cli/src/lib/inspect/auth.tsComplete refactor: replaced manual file reading with CredentialsStore and added OAuth token refresh logic
packages/cli/src/lib/inspect/env.tsUpdated to use async getAuthToken() instead of sync getAuth()
packages/cli/src/lib/inspect/vercel-api.tsRemoved reference to vercel env pull from error message
packages/errors/src/index.tsRemoved reference to vercel env pull from VERCEL_403_ERROR_MESSAGE
.changeset/free-carrots-repair.mdAdded changeset documenting the change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to +61
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The version is hardcoded as '0.0.0' but should use the actual CLI version. Other commands in the codebase use this.config.version from oclif to get the version dynamically. However, since this is not in a command class context, consider passing the version as a parameter to getAuthToken() or importing it from package.json. This is important for proper user-agent tracking and debugging.

Copilot uses AI. Check for mistakes.
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token expiry check uses >= which means a token is considered valid even when expiresAt equals the current time. This could lead to using an expired token. Consider using > instead to ensure the token has not yet expired, or add a small buffer (e.g., 60 seconds) to refresh tokens before they actually expire.

Suggested change
if(credentials.expiresAt>=nowInSeconds){
if(credentials.expiresAt>nowInSeconds){

Copilot uses AI. Check for mistakes.
Comment on lines +27 to 88
export async function getAuthToken(): Promise<string | null> {
let credentials: Credentials;
try {
credentials = store.get();
} catch {
return null;
}
if (!credentials?.token) {
return null;
}

import fs from 'node:fs';
import path from 'node:path';
import XDGAppPaths from 'xdg-app-paths';
import { z } from 'zod';
// If there's no expiration info, assume the token is valid
// (e.g. legacy tokens without OAuth)
if (typeof credentials.expiresAt !== 'number') {
return credentials.token;
}

// Types aren't inferred correctly. Typescript wants us to call `.default` on the imported module,
// but the actual underlying JS code exposes the code top-level, so we need to cast it here.
const getXDGAppPaths = (app: string) => {
return (
XDGAppPaths as unknown as (app: string) => { dataDirs: () => string[] }
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {
// Token is still valid
return credentials.token;
}

const vercelDirectories = getXDGAppPaths('com.vercel.cli').dataDirs();
// Token is expired — attempt refresh
if (!credentials.refreshToken) {
logger.debug('Auth token expired and no refresh token available');
return null;
}

const AuthFile = z.object({
token: z.string().min(1),
refresh_token: z.string().min(1).optional(),
expiresAt: z.number().optional(),
});
logger.debug('Auth token expired, refreshing via OAuth...');
try {
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

type AuthFile = z.infer<typeof AuthFile>;
const oauth = OAuth({
issuer: VERCEL_ISSUER,
clientId: VERCEL_CLI_CLIENT_ID,
userAgent,
});
const client = await oauth.init();
const tokenSet = await client.refreshToken(credentials.refreshToken);

// Returns whether a directory exists
const isDirectory = (path: string): boolean => {
try {
return fs.lstatSync(path).isDirectory();
} catch (_) {
// We don't care which kind of error occured, it isn't a directory anyway.
return false;
}
};
const updatedCredentials = {
...credentials,
token: tokenSet.access_token,
expiresAt: Math.floor(Date.now() / 1000) + tokenSet.expires_in,
...(tokenSet.refresh_token
? { refreshToken: tokenSet.refresh_token }
: {}),
};

// Returns in which directory the config should be present
const getGlobalPathConfig = (): string => {
// The customPath flag is the preferred location,
// followed by the vercel directory.
// (Legacy "now" directory is no longer supported)
// If none of those exist, use the vercel directory.
return (
vercelDirectories.find((configPath) => isDirectory(configPath)) ||
vercelDirectories[0]
);
};
store.update(updatedCredentials);
logger.debug('Auth token refreshed successfully');

export const getAuth = () => {
try {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
return AuthFile.parse(JSON.parse(fs.readFileSync(pathname, 'utf8')));
} catch {
return tokenSet.access_token;
} catch (error) {
logger.debug('Failed to refresh auth token:', error);
return null;
}
};

export async function updateAuthConfig(
config: Partial<AuthFile>
): Promise<void> {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
fs.mkdirSync(path.dirname(pathname), { recursive: true });
fs.writeFileSync(pathname, JSON.stringify(config, null, 2) + '\n');
}

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token refresh logic lacks protection against concurrent refresh attempts. If getAuthToken() is called multiple times simultaneously while a token is expired, multiple refresh requests could be initiated in parallel, potentially causing race conditions. Consider implementing a mutex or promise caching mechanism to ensure only one refresh happens at a time.

Copilot uses AI. Check for mistakes.
let credentials: Credentials;
try {
credentials = store.get();
} catch {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The error when reading credentials is caught and silently ignored. While this may be intentional for cases where credentials don't exist, it also silently hides other errors like permission issues or corrupted files. Consider logging these errors at debug level to aid troubleshooting, similar to how refresh errors are logged at line 85.

Suggested change
}catch{
}catch(error){
logger.debug('Failed to read auth credentials from store:',error);

Copilot uses AI. Check for mistakes.
"@workflow/builders": "workspace:*",
"@workflow/swc-plugin": "workspace:*",
"@workflow/utils": "workspace:*",
"@vercel/cli-auth": "0.0.1",

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The @vercel/cli-auth package is at version 0.0.1, which indicates it's in very early development. Using such an early version in production could be risky as the API may be unstable and subject to breaking changes. Consider verifying that this is the intended version and that it's stable enough for production use.

Suggested change
"@vercel/cli-auth": "0.0.1",
"@vercel/cli-auth": "^1.0.0",

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate enabled auto-merge (squash) February 13, 2026 21:25
@TooTallNate
TooTallNate merged commit 8cfb438 into mainFeb 13, 2026
160 of 171 checks passed
@TooTallNate
TooTallNate deleted the 02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh branch February 13, 2026 21:46
Sign up for freeto 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.

4 participants

@TooTallNate@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Use @vercel/cli-auth for auth token reading and OAuth refresh - #1043

Merged
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh
Feb 13, 2026
Merged

Use @vercel/cli-auth for auth token reading and OAuth refresh#1043
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Replace the manual auth.json reading logic in the CLI with the @vercel/cli-auth package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.

Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.

Replace the manual auth.json reading logic in the CLI with the `@vercel/cli-auth` package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.
Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.
@changeset-bot

changeset-botBot commented Feb 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8dbf9a9

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

This PR includes changesets to release 14 packages
NameType
@workflow/cliPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

@TooTallNate
TooTallNate marked this pull request as ready for review February 13, 2026 19:19
CopilotAI review requested due to automatic review settings February 13, 2026 19:19
@vercel

vercelBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

@TooTallNate
TooTallNate requested review from a team and removed request for CopilotFebruary 13, 2026 19:20
@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.032s (+14.9% 🔺)1.005s (~)0.974s101.00x
💻 LocalNitro0.033s (+2.2%)1.005s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.035s1.005s0.970s101.11x
🌐 RedisNext.js (Turbopack)0.043s1.005s0.961s101.37x
🌐 MongoDBNext.js (Turbopack)0.074s1.007s0.932s102.34x
🐘 PostgresExpress0.137s (+49.3% 🔺)1.011s (~)0.874s104.31x
🐘 PostgresNitro0.340s (+61.4% 🔺)1.012s (~)0.672s1010.73x
🐘 PostgresNext.js (Turbopack)0.436s1.009s0.573s1013.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.564s (-24.9% 🟢)2.009s (-1.4%)1.444s101.00x
▲ VercelNext.js (Turbopack)0.600s (-13.1% 🟢)2.053s (-4.1%)1.453s101.06x
▲ VercelNitro0.612s (+2.0%)2.052s (+2.9%)1.440s101.08x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.086s2.005s0.919s101.00x
💻 LocalExpress1.105s (+2.4%)2.006s (~)0.901s101.02x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.02x
🌐 RedisNext.js (Turbopack)1.109s2.006s0.897s101.02x
🌐 MongoDBNext.js (Turbopack)1.296s2.006s0.710s101.19x
🐘 PostgresNext.js (Turbopack)1.815s2.012s0.197s101.67x
🐘 PostgresNitro2.391s (-1.9%)3.014s (~)0.624s102.20x
🐘 PostgresExpress2.460s (~)3.014s (~)0.554s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.377s (-1.1%)3.225s (+2.5%)0.848s101.00x
▲ VercelNext.js (Turbopack)2.484s (-4.4%)3.426s (~)0.942s101.04x
▲ VercelNitro3.138s (+26.6% 🔺)4.160s (+19.3% 🔺)1.022s101.32x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.645s11.021s0.376s31.00x
🌐 RedisNext.js (Turbopack)10.722s11.022s0.300s31.01x
💻 LocalNitro10.831s (~)11.022s (~)0.191s31.02x
💻 LocalExpress10.832s (+2.3%)11.023s (~)0.191s31.02x
🌐 MongoDBNext.js (Turbopack)12.197s13.013s0.816s31.15x
🐘 PostgresNext.js (Turbopack)14.800s15.041s0.241s21.39x
🐘 PostgresNitro20.247s (~)21.059s (~)0.812s21.90x
🐘 PostgresExpress20.317s (~)21.059s (~)0.742s21.91x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.813s (-3.0%)19.224s (-1.9%)1.411s21.00x
▲ VercelExpress18.124s (-1.3%)19.409s (-1.9%)1.285s21.02x
▲ VercelNext.js (Turbopack)22.613s (+19.3% 🔺)24.038s (+18.8% 🔺)1.425s21.27x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.857s27.050s0.193s31.00x
💻 LocalNext.js (Turbopack)26.923s27.053s0.130s31.00x
💻 LocalExpress27.497s (+2.3%)28.051s (+3.7%)0.554s31.02x
💻 LocalNitro27.532s (~)28.052s (~)0.519s31.03x
🌐 MongoDBNext.js (Turbopack)30.454s31.026s0.571s21.13x
🐘 PostgresNext.js (Turbopack)37.396s38.085s0.689s21.39x
🐘 PostgresExpress50.339s (~)51.127s (+1.0%)0.788s21.87x
🐘 PostgresNitro50.541s (~)51.128s (~)0.588s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)51.638s (+13.8% 🔺)52.494s (+13.6% 🔺)0.856s21.00x
▲ VercelExpress53.536s (+19.5% 🔺)54.278s (+17.8% 🔺)0.742s21.04x
▲ VercelNitro55.613s (+26.3% 🔺)56.634s (+24.7% 🔺)1.021s21.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.454s55.097s0.643s21.00x
💻 LocalNext.js (Turbopack)56.008s56.107s0.099s21.03x
💻 LocalExpress57.304s (+2.3%)58.098s (+3.6%)0.794s21.05x
💻 LocalNitro57.494s (~)58.106s (~)0.612s21.06x
🌐 MongoDBNext.js (Turbopack)60.847s61.065s0.218s21.12x
🐘 PostgresNext.js (Turbopack)71.530s72.161s0.631s21.31x
🐘 PostgresNitro100.228s (~)100.234s (-1.0%)0.006s11.84x
🐘 PostgresExpress100.245s (~)101.244s (+1.0%)0.999s11.84x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.956s (+2.0%)92.604s (+1.0%)0.648s11.00x
▲ VercelNext.js (Turbopack)97.319s (+5.3% 🔺)99.055s (+6.1% 🔺)1.736s11.06x
▲ VercelExpress105.381s (+17.3% 🔺)106.071s (+16.4% 🔺)0.690s11.15x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.243s2.006s0.763s151.00x
💻 LocalNext.js (Turbopack)1.387s2.005s0.618s151.12x
💻 LocalExpress1.411s (+2.9%)2.006s (~)0.595s151.13x
💻 LocalNitro1.438s (+1.8%)2.006s (~)0.568s151.16x
🐘 PostgresNext.js (Turbopack)2.038s2.297s0.259s141.64x
🌐 MongoDBNext.js (Turbopack)2.137s3.007s0.870s101.72x
🐘 PostgresExpress2.294s (+2.7%)3.015s (~)0.721s101.84x
🐘 PostgresNitro2.309s (-4.4%)3.014s (~)0.705s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.812s (+9.3% 🔺)3.766s (+10.0% 🔺)0.954s81.00x
▲ VercelExpress2.869s (+11.7% 🔺)3.963s (+14.6% 🔺)1.094s81.02x
▲ VercelNext.js (Turbopack)3.053s (-0.7%)3.991s (-3.9%)0.938s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.404s3.007s0.603s101.00x
🌐 RedisNext.js (Turbopack)2.475s3.007s0.532s101.03x
💻 LocalExpress2.592s (+10.4% 🔺)3.007s (~)0.416s101.08x
💻 LocalNitro2.694s (+2.9%)3.008s (~)0.314s101.12x
🌐 MongoDBNext.js (Turbopack)4.678s5.176s0.498s61.95x
🐘 PostgresExpress8.735s (-0.5%)9.032s (-2.8%)0.297s43.63x
🐘 PostgresNitro9.251s (-3.1%)9.787s (-2.5%)0.537s43.85x
🐘 PostgresNext.js (Turbopack)10.773s11.036s0.263s34.48x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.707s (-33.0% 🟢)3.539s (-33.9% 🟢)0.832s91.00x
▲ VercelNext.js (Turbopack)2.980s (+8.6% 🔺)3.991s (+9.8% 🔺)1.010s81.10x
▲ VercelExpress3.179s (+8.9% 🔺)4.159s (+6.4% 🔺)0.981s81.17x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.080s4.867s0.786s71.00x
💻 LocalNext.js (Turbopack)6.763s7.215s0.452s51.66x
💻 LocalExpress7.457s (+15.1% 🔺)8.016s (+14.3% 🔺)0.559s41.83x
💻 LocalNitro7.814s (+5.0% 🔺)8.271s (+3.1%)0.456s41.92x
🌐 MongoDBNext.js (Turbopack)9.892s10.346s0.454s32.42x
🐘 PostgresNitro47.939s (+4.4%)48.145s (+4.4%)0.206s111.75x
🐘 PostgresExpress49.134s (+4.8%)50.148s (+6.4% 🔺)1.014s112.04x
🐘 PostgresNext.js (Turbopack)50.848s51.123s0.275s112.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.480s (+59.1% 🔺)7.709s (+49.5% 🔺)1.229s51.00x
▲ VercelExpress7.002s (+92.1% 🔺)8.127s (+74.4% 🔺)1.125s41.08x
▲ VercelNext.js (Turbopack)9.671s (+131.0% 🔺)10.844s (+107.7% 🔺)1.172s31.49x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.262s2.006s0.744s151.00x
💻 LocalNext.js (Turbopack)1.421s2.004s0.583s151.13x
💻 LocalNitro1.422s (+1.2%)2.005s (~)0.583s151.13x
💻 LocalExpress1.424s (+3.8%)2.005s (~)0.581s151.13x
🐘 PostgresNitro2.029s (+12.2% 🔺)2.397s (~)0.368s131.61x
🐘 PostgresExpress2.049s (-6.0% 🟢)2.924s (+6.7% 🔺)0.875s111.62x
🐘 PostgresNext.js (Turbopack)2.153s2.830s0.678s111.71x
🌐 MongoDBNext.js (Turbopack)2.172s3.008s0.836s101.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.393s (-2.3%)3.369s (-3.4%)0.977s91.00x
▲ VercelNitro2.671s (+11.6% 🔺)3.622s (+7.4% 🔺)0.951s91.12x
▲ VercelExpress3.523s (+21.1% 🔺)4.331s (+13.5% 🔺)0.807s81.47x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.457s3.007s0.551s101.00x
🌐 RedisNext.js (Turbopack)2.494s3.008s0.514s101.02x
💻 LocalExpress2.738s (+10.3% 🔺)3.007s (~)0.269s101.11x
💻 LocalNitro2.796s (+3.7%)3.009s (~)0.213s101.14x
🌐 MongoDBNext.js (Turbopack)4.673s5.176s0.503s61.90x
🐘 PostgresExpress8.599s (-30.0% 🟢)9.278s (-25.0% 🟢)0.679s43.50x
🐘 PostgresNitro10.123s (-11.0% 🟢)10.699s (-11.1% 🟢)0.577s34.12x
🐘 PostgresNext.js (Turbopack)12.685s13.369s0.684s35.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.463s (-17.8% 🟢)3.257s (-14.2% 🟢)0.794s101.00x
▲ VercelNitro2.514s (+3.1%)3.472s (+5.6% 🔺)0.957s91.02x
▲ VercelNext.js (Turbopack)3.549s (+22.9% 🔺)4.411s (+14.9% 🔺)0.863s71.44x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.108s4.868s0.760s71.00x
💻 LocalNext.js (Turbopack)7.195s7.613s0.418s51.75x
💻 LocalExpress7.955s (+9.6% 🔺)8.770s (+9.4% 🔺)0.815s41.94x
💻 LocalNitro8.409s (+5.9% 🔺)9.022s (+9.1% 🔺)0.614s42.05x
🌐 MongoDBNext.js (Turbopack)9.893s10.347s0.455s32.41x
🐘 PostgresExpress46.892s (-4.8%)47.127s (-6.0% 🟢)0.235s111.41x
🐘 PostgresNitro48.666s (-0.9%)49.118s (-2.0%)0.452s111.85x
🐘 PostgresNext.js (Turbopack)54.890s55.134s0.244s113.36x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.362s (-25.5% 🟢)6.455s (-24.5% 🟢)1.093s51.00x
▲ VercelNext.js (Turbopack)6.379s (-11.7% 🟢)7.613s (-11.1% 🟢)1.234s51.19x
▲ VercelExpress7.040s (+61.0% 🔺)8.169s (+49.1% 🔺)1.129s41.31x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.131s1.001s0.010s1.016s0.885s101.00x
🌐 RedisNext.js (Turbopack)0.144s1.000s0.001s1.007s0.863s101.10x
💻 LocalExpress0.172s (+49.6% 🔺)1.002s (~)0.011s (-1.9%)1.015s (~)0.843s101.31x
💻 LocalNitro0.177s (+2.0%)1.003s (~)0.011s (+1.9%)1.017s (~)0.840s101.35x
🌐 MongoDBNext.js (Turbopack)0.483s0.965s0.001s1.008s0.525s103.68x
🐘 PostgresNext.js (Turbopack)0.697s0.860s0.001s1.010s0.313s105.30x
🐘 PostgresNitro2.335s (-4.7%)2.709s (+4.6%)0.001s (~)3.015s (~)0.681s1017.77x
🐘 PostgresExpress2.351s (+2.6%)2.693s (-2.1%)0.001s (-7.1% 🟢)3.015s (~)0.664s1017.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.927s (-9.8% 🟢)2.645s (~)0.216s (-14.7% 🟢)3.413s (-0.9%)1.486s101.00x
▲ VercelExpress2.045s (-6.0% 🟢)2.711s (-2.9%)0.150s (-46.1% 🟢)3.455s (-6.1% 🟢)1.410s101.06x
▲ VercelNext.js (Turbopack)2.120s (-10.3% 🟢)2.769s (+4.0%)0.166s (-38.3% 🟢)3.524s (-1.9%)1.404s101.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)💻 Local6/12
Nitro💻 Local9/12
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

@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production501038539
✅ 💻 Local Development520068588
✅ 📦 Local Production520068588
✅ 🐘 Local Postgres520068588
✅ 🪟 Windows460349
❌ 🌍 Community Worlds105429156
✅ 📋 Other126021147
Total2338422752655

❌ Failed Tests

🌍 Community Worlds (42 failed)

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • 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
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4504
✅ example4504
✅ express4504
✅ fastify4504
✅ hono4504
✅ nextjs-turbopack4801
✅ nextjs-webpack4801
✅ nitro4504
✅ nuxt4504
✅ sveltekit4504
✅ vite4504
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4603
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4603
✅ redis-dev300
✅ redis4603
✅ turso-dev300
❌ turso4423
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4207
✅ e2e-local-postgres-nest-stable4207
✅ e2e-local-prod-nest-stable4207

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces manual authentication file reading with the @vercel/cli-auth package, adding automatic OAuth token refresh functionality. Previously, the CLI would read the auth token from disk without any refresh logic, causing API calls to fail when tokens expired. Now, getAuthToken() automatically checks token expiry and refreshes expired tokens using stored refresh tokens.

Changes:

  • Integrated @vercel/cli-auth package (v0.0.1) for credential management and OAuth refresh
  • Refactored authentication logic to support automatic token refresh before expiry
  • Simplified error messages by removing references to manual vercel env pull commands

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdded @vercel/cli-auth@0.0.1 and its dependencies (async-listen, open@8.4.0)
packages/cli/package.jsonAdded @vercel/cli-auth as a dependency
packages/cli/src/lib/inspect/auth.tsComplete refactor: replaced manual file reading with CredentialsStore and added OAuth token refresh logic
packages/cli/src/lib/inspect/env.tsUpdated to use async getAuthToken() instead of sync getAuth()
packages/cli/src/lib/inspect/vercel-api.tsRemoved reference to vercel env pull from error message
packages/errors/src/index.tsRemoved reference to vercel env pull from VERCEL_403_ERROR_MESSAGE
.changeset/free-carrots-repair.mdAdded changeset documenting the change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to +61
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The version is hardcoded as '0.0.0' but should use the actual CLI version. Other commands in the codebase use this.config.version from oclif to get the version dynamically. However, since this is not in a command class context, consider passing the version as a parameter to getAuthToken() or importing it from package.json. This is important for proper user-agent tracking and debugging.

Copilot uses AI. Check for mistakes.
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token expiry check uses >= which means a token is considered valid even when expiresAt equals the current time. This could lead to using an expired token. Consider using > instead to ensure the token has not yet expired, or add a small buffer (e.g., 60 seconds) to refresh tokens before they actually expire.

Suggested change
if(credentials.expiresAt>=nowInSeconds){
if(credentials.expiresAt>nowInSeconds){

Copilot uses AI. Check for mistakes.
Comment on lines +27 to 88
export async function getAuthToken(): Promise<string | null> {
let credentials: Credentials;
try {
credentials = store.get();
} catch {
return null;
}
if (!credentials?.token) {
return null;
}

import fs from 'node:fs';
import path from 'node:path';
import XDGAppPaths from 'xdg-app-paths';
import { z } from 'zod';
// If there's no expiration info, assume the token is valid
// (e.g. legacy tokens without OAuth)
if (typeof credentials.expiresAt !== 'number') {
return credentials.token;
}

// Types aren't inferred correctly. Typescript wants us to call `.default` on the imported module,
// but the actual underlying JS code exposes the code top-level, so we need to cast it here.
const getXDGAppPaths = (app: string) => {
return (
XDGAppPaths as unknown as (app: string) => { dataDirs: () => string[] }
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {
// Token is still valid
return credentials.token;
}

const vercelDirectories = getXDGAppPaths('com.vercel.cli').dataDirs();
// Token is expired — attempt refresh
if (!credentials.refreshToken) {
logger.debug('Auth token expired and no refresh token available');
return null;
}

const AuthFile = z.object({
token: z.string().min(1),
refresh_token: z.string().min(1).optional(),
expiresAt: z.number().optional(),
});
logger.debug('Auth token expired, refreshing via OAuth...');
try {
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

type AuthFile = z.infer<typeof AuthFile>;
const oauth = OAuth({
issuer: VERCEL_ISSUER,
clientId: VERCEL_CLI_CLIENT_ID,
userAgent,
});
const client = await oauth.init();
const tokenSet = await client.refreshToken(credentials.refreshToken);

// Returns whether a directory exists
const isDirectory = (path: string): boolean => {
try {
return fs.lstatSync(path).isDirectory();
} catch (_) {
// We don't care which kind of error occured, it isn't a directory anyway.
return false;
}
};
const updatedCredentials = {
...credentials,
token: tokenSet.access_token,
expiresAt: Math.floor(Date.now() / 1000) + tokenSet.expires_in,
...(tokenSet.refresh_token
? { refreshToken: tokenSet.refresh_token }
: {}),
};

// Returns in which directory the config should be present
const getGlobalPathConfig = (): string => {
// The customPath flag is the preferred location,
// followed by the vercel directory.
// (Legacy "now" directory is no longer supported)
// If none of those exist, use the vercel directory.
return (
vercelDirectories.find((configPath) => isDirectory(configPath)) ||
vercelDirectories[0]
);
};
store.update(updatedCredentials);
logger.debug('Auth token refreshed successfully');

export const getAuth = () => {
try {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
return AuthFile.parse(JSON.parse(fs.readFileSync(pathname, 'utf8')));
} catch {
return tokenSet.access_token;
} catch (error) {
logger.debug('Failed to refresh auth token:', error);
return null;
}
};

export async function updateAuthConfig(
config: Partial<AuthFile>
): Promise<void> {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
fs.mkdirSync(path.dirname(pathname), { recursive: true });
fs.writeFileSync(pathname, JSON.stringify(config, null, 2) + '\n');
}

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token refresh logic lacks protection against concurrent refresh attempts. If getAuthToken() is called multiple times simultaneously while a token is expired, multiple refresh requests could be initiated in parallel, potentially causing race conditions. Consider implementing a mutex or promise caching mechanism to ensure only one refresh happens at a time.

Copilot uses AI. Check for mistakes.
let credentials: Credentials;
try {
credentials = store.get();
} catch {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The error when reading credentials is caught and silently ignored. While this may be intentional for cases where credentials don't exist, it also silently hides other errors like permission issues or corrupted files. Consider logging these errors at debug level to aid troubleshooting, similar to how refresh errors are logged at line 85.

Suggested change
}catch{
}catch(error){
logger.debug('Failed to read auth credentials from store:',error);

Copilot uses AI. Check for mistakes.
"@workflow/builders": "workspace:*",
"@workflow/swc-plugin": "workspace:*",
"@workflow/utils": "workspace:*",
"@vercel/cli-auth": "0.0.1",

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The @vercel/cli-auth package is at version 0.0.1, which indicates it's in very early development. Using such an early version in production could be risky as the API may be unstable and subject to breaking changes. Consider verifying that this is the intended version and that it's stable enough for production use.

Suggested change
"@vercel/cli-auth": "0.0.1",
"@vercel/cli-auth": "^1.0.0",

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate enabled auto-merge (squash) February 13, 2026 21:25
@TooTallNate
TooTallNate merged commit 8cfb438 into mainFeb 13, 2026
160 of 171 checks passed
@TooTallNate
TooTallNate deleted the 02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh branch February 13, 2026 21:46
Sign up for freeto 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.

4 participants

@TooTallNate@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Use @vercel/cli-auth for auth token reading and OAuth refresh - #1043

Merged
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh
Feb 13, 2026
Merged

Use @vercel/cli-auth for auth token reading and OAuth refresh#1043
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Replace the manual auth.json reading logic in the CLI with the @vercel/cli-auth package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.

Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.

Replace the manual auth.json reading logic in the CLI with the `@vercel/cli-auth` package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.
Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.
@changeset-bot

changeset-botBot commented Feb 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8dbf9a9

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

This PR includes changesets to release 14 packages
NameType
@workflow/cliPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

@TooTallNate
TooTallNate marked this pull request as ready for review February 13, 2026 19:19
CopilotAI review requested due to automatic review settings February 13, 2026 19:19
@vercel

vercelBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

@TooTallNate
TooTallNate requested review from a team and removed request for CopilotFebruary 13, 2026 19:20
@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.032s (+14.9% 🔺)1.005s (~)0.974s101.00x
💻 LocalNitro0.033s (+2.2%)1.005s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.035s1.005s0.970s101.11x
🌐 RedisNext.js (Turbopack)0.043s1.005s0.961s101.37x
🌐 MongoDBNext.js (Turbopack)0.074s1.007s0.932s102.34x
🐘 PostgresExpress0.137s (+49.3% 🔺)1.011s (~)0.874s104.31x
🐘 PostgresNitro0.340s (+61.4% 🔺)1.012s (~)0.672s1010.73x
🐘 PostgresNext.js (Turbopack)0.436s1.009s0.573s1013.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.564s (-24.9% 🟢)2.009s (-1.4%)1.444s101.00x
▲ VercelNext.js (Turbopack)0.600s (-13.1% 🟢)2.053s (-4.1%)1.453s101.06x
▲ VercelNitro0.612s (+2.0%)2.052s (+2.9%)1.440s101.08x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.086s2.005s0.919s101.00x
💻 LocalExpress1.105s (+2.4%)2.006s (~)0.901s101.02x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.02x
🌐 RedisNext.js (Turbopack)1.109s2.006s0.897s101.02x
🌐 MongoDBNext.js (Turbopack)1.296s2.006s0.710s101.19x
🐘 PostgresNext.js (Turbopack)1.815s2.012s0.197s101.67x
🐘 PostgresNitro2.391s (-1.9%)3.014s (~)0.624s102.20x
🐘 PostgresExpress2.460s (~)3.014s (~)0.554s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.377s (-1.1%)3.225s (+2.5%)0.848s101.00x
▲ VercelNext.js (Turbopack)2.484s (-4.4%)3.426s (~)0.942s101.04x
▲ VercelNitro3.138s (+26.6% 🔺)4.160s (+19.3% 🔺)1.022s101.32x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.645s11.021s0.376s31.00x
🌐 RedisNext.js (Turbopack)10.722s11.022s0.300s31.01x
💻 LocalNitro10.831s (~)11.022s (~)0.191s31.02x
💻 LocalExpress10.832s (+2.3%)11.023s (~)0.191s31.02x
🌐 MongoDBNext.js (Turbopack)12.197s13.013s0.816s31.15x
🐘 PostgresNext.js (Turbopack)14.800s15.041s0.241s21.39x
🐘 PostgresNitro20.247s (~)21.059s (~)0.812s21.90x
🐘 PostgresExpress20.317s (~)21.059s (~)0.742s21.91x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.813s (-3.0%)19.224s (-1.9%)1.411s21.00x
▲ VercelExpress18.124s (-1.3%)19.409s (-1.9%)1.285s21.02x
▲ VercelNext.js (Turbopack)22.613s (+19.3% 🔺)24.038s (+18.8% 🔺)1.425s21.27x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.857s27.050s0.193s31.00x
💻 LocalNext.js (Turbopack)26.923s27.053s0.130s31.00x
💻 LocalExpress27.497s (+2.3%)28.051s (+3.7%)0.554s31.02x
💻 LocalNitro27.532s (~)28.052s (~)0.519s31.03x
🌐 MongoDBNext.js (Turbopack)30.454s31.026s0.571s21.13x
🐘 PostgresNext.js (Turbopack)37.396s38.085s0.689s21.39x
🐘 PostgresExpress50.339s (~)51.127s (+1.0%)0.788s21.87x
🐘 PostgresNitro50.541s (~)51.128s (~)0.588s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)51.638s (+13.8% 🔺)52.494s (+13.6% 🔺)0.856s21.00x
▲ VercelExpress53.536s (+19.5% 🔺)54.278s (+17.8% 🔺)0.742s21.04x
▲ VercelNitro55.613s (+26.3% 🔺)56.634s (+24.7% 🔺)1.021s21.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.454s55.097s0.643s21.00x
💻 LocalNext.js (Turbopack)56.008s56.107s0.099s21.03x
💻 LocalExpress57.304s (+2.3%)58.098s (+3.6%)0.794s21.05x
💻 LocalNitro57.494s (~)58.106s (~)0.612s21.06x
🌐 MongoDBNext.js (Turbopack)60.847s61.065s0.218s21.12x
🐘 PostgresNext.js (Turbopack)71.530s72.161s0.631s21.31x
🐘 PostgresNitro100.228s (~)100.234s (-1.0%)0.006s11.84x
🐘 PostgresExpress100.245s (~)101.244s (+1.0%)0.999s11.84x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.956s (+2.0%)92.604s (+1.0%)0.648s11.00x
▲ VercelNext.js (Turbopack)97.319s (+5.3% 🔺)99.055s (+6.1% 🔺)1.736s11.06x
▲ VercelExpress105.381s (+17.3% 🔺)106.071s (+16.4% 🔺)0.690s11.15x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.243s2.006s0.763s151.00x
💻 LocalNext.js (Turbopack)1.387s2.005s0.618s151.12x
💻 LocalExpress1.411s (+2.9%)2.006s (~)0.595s151.13x
💻 LocalNitro1.438s (+1.8%)2.006s (~)0.568s151.16x
🐘 PostgresNext.js (Turbopack)2.038s2.297s0.259s141.64x
🌐 MongoDBNext.js (Turbopack)2.137s3.007s0.870s101.72x
🐘 PostgresExpress2.294s (+2.7%)3.015s (~)0.721s101.84x
🐘 PostgresNitro2.309s (-4.4%)3.014s (~)0.705s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.812s (+9.3% 🔺)3.766s (+10.0% 🔺)0.954s81.00x
▲ VercelExpress2.869s (+11.7% 🔺)3.963s (+14.6% 🔺)1.094s81.02x
▲ VercelNext.js (Turbopack)3.053s (-0.7%)3.991s (-3.9%)0.938s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.404s3.007s0.603s101.00x
🌐 RedisNext.js (Turbopack)2.475s3.007s0.532s101.03x
💻 LocalExpress2.592s (+10.4% 🔺)3.007s (~)0.416s101.08x
💻 LocalNitro2.694s (+2.9%)3.008s (~)0.314s101.12x
🌐 MongoDBNext.js (Turbopack)4.678s5.176s0.498s61.95x
🐘 PostgresExpress8.735s (-0.5%)9.032s (-2.8%)0.297s43.63x
🐘 PostgresNitro9.251s (-3.1%)9.787s (-2.5%)0.537s43.85x
🐘 PostgresNext.js (Turbopack)10.773s11.036s0.263s34.48x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.707s (-33.0% 🟢)3.539s (-33.9% 🟢)0.832s91.00x
▲ VercelNext.js (Turbopack)2.980s (+8.6% 🔺)3.991s (+9.8% 🔺)1.010s81.10x
▲ VercelExpress3.179s (+8.9% 🔺)4.159s (+6.4% 🔺)0.981s81.17x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.080s4.867s0.786s71.00x
💻 LocalNext.js (Turbopack)6.763s7.215s0.452s51.66x
💻 LocalExpress7.457s (+15.1% 🔺)8.016s (+14.3% 🔺)0.559s41.83x
💻 LocalNitro7.814s (+5.0% 🔺)8.271s (+3.1%)0.456s41.92x
🌐 MongoDBNext.js (Turbopack)9.892s10.346s0.454s32.42x
🐘 PostgresNitro47.939s (+4.4%)48.145s (+4.4%)0.206s111.75x
🐘 PostgresExpress49.134s (+4.8%)50.148s (+6.4% 🔺)1.014s112.04x
🐘 PostgresNext.js (Turbopack)50.848s51.123s0.275s112.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.480s (+59.1% 🔺)7.709s (+49.5% 🔺)1.229s51.00x
▲ VercelExpress7.002s (+92.1% 🔺)8.127s (+74.4% 🔺)1.125s41.08x
▲ VercelNext.js (Turbopack)9.671s (+131.0% 🔺)10.844s (+107.7% 🔺)1.172s31.49x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.262s2.006s0.744s151.00x
💻 LocalNext.js (Turbopack)1.421s2.004s0.583s151.13x
💻 LocalNitro1.422s (+1.2%)2.005s (~)0.583s151.13x
💻 LocalExpress1.424s (+3.8%)2.005s (~)0.581s151.13x
🐘 PostgresNitro2.029s (+12.2% 🔺)2.397s (~)0.368s131.61x
🐘 PostgresExpress2.049s (-6.0% 🟢)2.924s (+6.7% 🔺)0.875s111.62x
🐘 PostgresNext.js (Turbopack)2.153s2.830s0.678s111.71x
🌐 MongoDBNext.js (Turbopack)2.172s3.008s0.836s101.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.393s (-2.3%)3.369s (-3.4%)0.977s91.00x
▲ VercelNitro2.671s (+11.6% 🔺)3.622s (+7.4% 🔺)0.951s91.12x
▲ VercelExpress3.523s (+21.1% 🔺)4.331s (+13.5% 🔺)0.807s81.47x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.457s3.007s0.551s101.00x
🌐 RedisNext.js (Turbopack)2.494s3.008s0.514s101.02x
💻 LocalExpress2.738s (+10.3% 🔺)3.007s (~)0.269s101.11x
💻 LocalNitro2.796s (+3.7%)3.009s (~)0.213s101.14x
🌐 MongoDBNext.js (Turbopack)4.673s5.176s0.503s61.90x
🐘 PostgresExpress8.599s (-30.0% 🟢)9.278s (-25.0% 🟢)0.679s43.50x
🐘 PostgresNitro10.123s (-11.0% 🟢)10.699s (-11.1% 🟢)0.577s34.12x
🐘 PostgresNext.js (Turbopack)12.685s13.369s0.684s35.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.463s (-17.8% 🟢)3.257s (-14.2% 🟢)0.794s101.00x
▲ VercelNitro2.514s (+3.1%)3.472s (+5.6% 🔺)0.957s91.02x
▲ VercelNext.js (Turbopack)3.549s (+22.9% 🔺)4.411s (+14.9% 🔺)0.863s71.44x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.108s4.868s0.760s71.00x
💻 LocalNext.js (Turbopack)7.195s7.613s0.418s51.75x
💻 LocalExpress7.955s (+9.6% 🔺)8.770s (+9.4% 🔺)0.815s41.94x
💻 LocalNitro8.409s (+5.9% 🔺)9.022s (+9.1% 🔺)0.614s42.05x
🌐 MongoDBNext.js (Turbopack)9.893s10.347s0.455s32.41x
🐘 PostgresExpress46.892s (-4.8%)47.127s (-6.0% 🟢)0.235s111.41x
🐘 PostgresNitro48.666s (-0.9%)49.118s (-2.0%)0.452s111.85x
🐘 PostgresNext.js (Turbopack)54.890s55.134s0.244s113.36x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.362s (-25.5% 🟢)6.455s (-24.5% 🟢)1.093s51.00x
▲ VercelNext.js (Turbopack)6.379s (-11.7% 🟢)7.613s (-11.1% 🟢)1.234s51.19x
▲ VercelExpress7.040s (+61.0% 🔺)8.169s (+49.1% 🔺)1.129s41.31x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.131s1.001s0.010s1.016s0.885s101.00x
🌐 RedisNext.js (Turbopack)0.144s1.000s0.001s1.007s0.863s101.10x
💻 LocalExpress0.172s (+49.6% 🔺)1.002s (~)0.011s (-1.9%)1.015s (~)0.843s101.31x
💻 LocalNitro0.177s (+2.0%)1.003s (~)0.011s (+1.9%)1.017s (~)0.840s101.35x
🌐 MongoDBNext.js (Turbopack)0.483s0.965s0.001s1.008s0.525s103.68x
🐘 PostgresNext.js (Turbopack)0.697s0.860s0.001s1.010s0.313s105.30x
🐘 PostgresNitro2.335s (-4.7%)2.709s (+4.6%)0.001s (~)3.015s (~)0.681s1017.77x
🐘 PostgresExpress2.351s (+2.6%)2.693s (-2.1%)0.001s (-7.1% 🟢)3.015s (~)0.664s1017.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.927s (-9.8% 🟢)2.645s (~)0.216s (-14.7% 🟢)3.413s (-0.9%)1.486s101.00x
▲ VercelExpress2.045s (-6.0% 🟢)2.711s (-2.9%)0.150s (-46.1% 🟢)3.455s (-6.1% 🟢)1.410s101.06x
▲ VercelNext.js (Turbopack)2.120s (-10.3% 🟢)2.769s (+4.0%)0.166s (-38.3% 🟢)3.524s (-1.9%)1.404s101.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)💻 Local6/12
Nitro💻 Local9/12
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

@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production501038539
✅ 💻 Local Development520068588
✅ 📦 Local Production520068588
✅ 🐘 Local Postgres520068588
✅ 🪟 Windows460349
❌ 🌍 Community Worlds105429156
✅ 📋 Other126021147
Total2338422752655

❌ Failed Tests

🌍 Community Worlds (42 failed)

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • 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
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4504
✅ example4504
✅ express4504
✅ fastify4504
✅ hono4504
✅ nextjs-turbopack4801
✅ nextjs-webpack4801
✅ nitro4504
✅ nuxt4504
✅ sveltekit4504
✅ vite4504
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4603
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4603
✅ redis-dev300
✅ redis4603
✅ turso-dev300
❌ turso4423
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4207
✅ e2e-local-postgres-nest-stable4207
✅ e2e-local-prod-nest-stable4207

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces manual authentication file reading with the @vercel/cli-auth package, adding automatic OAuth token refresh functionality. Previously, the CLI would read the auth token from disk without any refresh logic, causing API calls to fail when tokens expired. Now, getAuthToken() automatically checks token expiry and refreshes expired tokens using stored refresh tokens.

Changes:

  • Integrated @vercel/cli-auth package (v0.0.1) for credential management and OAuth refresh
  • Refactored authentication logic to support automatic token refresh before expiry
  • Simplified error messages by removing references to manual vercel env pull commands

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdded @vercel/cli-auth@0.0.1 and its dependencies (async-listen, open@8.4.0)
packages/cli/package.jsonAdded @vercel/cli-auth as a dependency
packages/cli/src/lib/inspect/auth.tsComplete refactor: replaced manual file reading with CredentialsStore and added OAuth token refresh logic
packages/cli/src/lib/inspect/env.tsUpdated to use async getAuthToken() instead of sync getAuth()
packages/cli/src/lib/inspect/vercel-api.tsRemoved reference to vercel env pull from error message
packages/errors/src/index.tsRemoved reference to vercel env pull from VERCEL_403_ERROR_MESSAGE
.changeset/free-carrots-repair.mdAdded changeset documenting the change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to +61
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The version is hardcoded as '0.0.0' but should use the actual CLI version. Other commands in the codebase use this.config.version from oclif to get the version dynamically. However, since this is not in a command class context, consider passing the version as a parameter to getAuthToken() or importing it from package.json. This is important for proper user-agent tracking and debugging.

Copilot uses AI. Check for mistakes.
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token expiry check uses >= which means a token is considered valid even when expiresAt equals the current time. This could lead to using an expired token. Consider using > instead to ensure the token has not yet expired, or add a small buffer (e.g., 60 seconds) to refresh tokens before they actually expire.

Suggested change
if(credentials.expiresAt>=nowInSeconds){
if(credentials.expiresAt>nowInSeconds){

Copilot uses AI. Check for mistakes.
Comment on lines +27 to 88
export async function getAuthToken(): Promise<string | null> {
let credentials: Credentials;
try {
credentials = store.get();
} catch {
return null;
}
if (!credentials?.token) {
return null;
}

import fs from 'node:fs';
import path from 'node:path';
import XDGAppPaths from 'xdg-app-paths';
import { z } from 'zod';
// If there's no expiration info, assume the token is valid
// (e.g. legacy tokens without OAuth)
if (typeof credentials.expiresAt !== 'number') {
return credentials.token;
}

// Types aren't inferred correctly. Typescript wants us to call `.default` on the imported module,
// but the actual underlying JS code exposes the code top-level, so we need to cast it here.
const getXDGAppPaths = (app: string) => {
return (
XDGAppPaths as unknown as (app: string) => { dataDirs: () => string[] }
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {
// Token is still valid
return credentials.token;
}

const vercelDirectories = getXDGAppPaths('com.vercel.cli').dataDirs();
// Token is expired — attempt refresh
if (!credentials.refreshToken) {
logger.debug('Auth token expired and no refresh token available');
return null;
}

const AuthFile = z.object({
token: z.string().min(1),
refresh_token: z.string().min(1).optional(),
expiresAt: z.number().optional(),
});
logger.debug('Auth token expired, refreshing via OAuth...');
try {
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

type AuthFile = z.infer<typeof AuthFile>;
const oauth = OAuth({
issuer: VERCEL_ISSUER,
clientId: VERCEL_CLI_CLIENT_ID,
userAgent,
});
const client = await oauth.init();
const tokenSet = await client.refreshToken(credentials.refreshToken);

// Returns whether a directory exists
const isDirectory = (path: string): boolean => {
try {
return fs.lstatSync(path).isDirectory();
} catch (_) {
// We don't care which kind of error occured, it isn't a directory anyway.
return false;
}
};
const updatedCredentials = {
...credentials,
token: tokenSet.access_token,
expiresAt: Math.floor(Date.now() / 1000) + tokenSet.expires_in,
...(tokenSet.refresh_token
? { refreshToken: tokenSet.refresh_token }
: {}),
};

// Returns in which directory the config should be present
const getGlobalPathConfig = (): string => {
// The customPath flag is the preferred location,
// followed by the vercel directory.
// (Legacy "now" directory is no longer supported)
// If none of those exist, use the vercel directory.
return (
vercelDirectories.find((configPath) => isDirectory(configPath)) ||
vercelDirectories[0]
);
};
store.update(updatedCredentials);
logger.debug('Auth token refreshed successfully');

export const getAuth = () => {
try {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
return AuthFile.parse(JSON.parse(fs.readFileSync(pathname, 'utf8')));
} catch {
return tokenSet.access_token;
} catch (error) {
logger.debug('Failed to refresh auth token:', error);
return null;
}
};

export async function updateAuthConfig(
config: Partial<AuthFile>
): Promise<void> {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
fs.mkdirSync(path.dirname(pathname), { recursive: true });
fs.writeFileSync(pathname, JSON.stringify(config, null, 2) + '\n');
}

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token refresh logic lacks protection against concurrent refresh attempts. If getAuthToken() is called multiple times simultaneously while a token is expired, multiple refresh requests could be initiated in parallel, potentially causing race conditions. Consider implementing a mutex or promise caching mechanism to ensure only one refresh happens at a time.

Copilot uses AI. Check for mistakes.
let credentials: Credentials;
try {
credentials = store.get();
} catch {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The error when reading credentials is caught and silently ignored. While this may be intentional for cases where credentials don't exist, it also silently hides other errors like permission issues or corrupted files. Consider logging these errors at debug level to aid troubleshooting, similar to how refresh errors are logged at line 85.

Suggested change
}catch{
}catch(error){
logger.debug('Failed to read auth credentials from store:',error);

Copilot uses AI. Check for mistakes.
"@workflow/builders": "workspace:*",
"@workflow/swc-plugin": "workspace:*",
"@workflow/utils": "workspace:*",
"@vercel/cli-auth": "0.0.1",

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The @vercel/cli-auth package is at version 0.0.1, which indicates it's in very early development. Using such an early version in production could be risky as the API may be unstable and subject to breaking changes. Consider verifying that this is the intended version and that it's stable enough for production use.

Suggested change
"@vercel/cli-auth": "0.0.1",
"@vercel/cli-auth": "^1.0.0",

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate enabled auto-merge (squash) February 13, 2026 21:25
@TooTallNate
TooTallNate merged commit 8cfb438 into mainFeb 13, 2026
160 of 171 checks passed
@TooTallNate
TooTallNate deleted the 02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh branch February 13, 2026 21:46
Sign up for freeto 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.

4 participants

@TooTallNate@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Use @vercel/cli-auth for auth token reading and OAuth refresh - #1043

Merged
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh
Feb 13, 2026
Merged

Use @vercel/cli-auth for auth token reading and OAuth refresh#1043
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Replace the manual auth.json reading logic in the CLI with the @vercel/cli-auth package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.

Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.

Replace the manual auth.json reading logic in the CLI with the `@vercel/cli-auth` package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.
Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.
@changeset-bot

changeset-botBot commented Feb 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8dbf9a9

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

This PR includes changesets to release 14 packages
NameType
@workflow/cliPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

@TooTallNate
TooTallNate marked this pull request as ready for review February 13, 2026 19:19
CopilotAI review requested due to automatic review settings February 13, 2026 19:19
@vercel

vercelBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

@TooTallNate
TooTallNate requested review from a team and removed request for CopilotFebruary 13, 2026 19:20
@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.032s (+14.9% 🔺)1.005s (~)0.974s101.00x
💻 LocalNitro0.033s (+2.2%)1.005s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.035s1.005s0.970s101.11x
🌐 RedisNext.js (Turbopack)0.043s1.005s0.961s101.37x
🌐 MongoDBNext.js (Turbopack)0.074s1.007s0.932s102.34x
🐘 PostgresExpress0.137s (+49.3% 🔺)1.011s (~)0.874s104.31x
🐘 PostgresNitro0.340s (+61.4% 🔺)1.012s (~)0.672s1010.73x
🐘 PostgresNext.js (Turbopack)0.436s1.009s0.573s1013.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.564s (-24.9% 🟢)2.009s (-1.4%)1.444s101.00x
▲ VercelNext.js (Turbopack)0.600s (-13.1% 🟢)2.053s (-4.1%)1.453s101.06x
▲ VercelNitro0.612s (+2.0%)2.052s (+2.9%)1.440s101.08x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.086s2.005s0.919s101.00x
💻 LocalExpress1.105s (+2.4%)2.006s (~)0.901s101.02x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.02x
🌐 RedisNext.js (Turbopack)1.109s2.006s0.897s101.02x
🌐 MongoDBNext.js (Turbopack)1.296s2.006s0.710s101.19x
🐘 PostgresNext.js (Turbopack)1.815s2.012s0.197s101.67x
🐘 PostgresNitro2.391s (-1.9%)3.014s (~)0.624s102.20x
🐘 PostgresExpress2.460s (~)3.014s (~)0.554s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.377s (-1.1%)3.225s (+2.5%)0.848s101.00x
▲ VercelNext.js (Turbopack)2.484s (-4.4%)3.426s (~)0.942s101.04x
▲ VercelNitro3.138s (+26.6% 🔺)4.160s (+19.3% 🔺)1.022s101.32x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.645s11.021s0.376s31.00x
🌐 RedisNext.js (Turbopack)10.722s11.022s0.300s31.01x
💻 LocalNitro10.831s (~)11.022s (~)0.191s31.02x
💻 LocalExpress10.832s (+2.3%)11.023s (~)0.191s31.02x
🌐 MongoDBNext.js (Turbopack)12.197s13.013s0.816s31.15x
🐘 PostgresNext.js (Turbopack)14.800s15.041s0.241s21.39x
🐘 PostgresNitro20.247s (~)21.059s (~)0.812s21.90x
🐘 PostgresExpress20.317s (~)21.059s (~)0.742s21.91x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.813s (-3.0%)19.224s (-1.9%)1.411s21.00x
▲ VercelExpress18.124s (-1.3%)19.409s (-1.9%)1.285s21.02x
▲ VercelNext.js (Turbopack)22.613s (+19.3% 🔺)24.038s (+18.8% 🔺)1.425s21.27x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.857s27.050s0.193s31.00x
💻 LocalNext.js (Turbopack)26.923s27.053s0.130s31.00x
💻 LocalExpress27.497s (+2.3%)28.051s (+3.7%)0.554s31.02x
💻 LocalNitro27.532s (~)28.052s (~)0.519s31.03x
🌐 MongoDBNext.js (Turbopack)30.454s31.026s0.571s21.13x
🐘 PostgresNext.js (Turbopack)37.396s38.085s0.689s21.39x
🐘 PostgresExpress50.339s (~)51.127s (+1.0%)0.788s21.87x
🐘 PostgresNitro50.541s (~)51.128s (~)0.588s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)51.638s (+13.8% 🔺)52.494s (+13.6% 🔺)0.856s21.00x
▲ VercelExpress53.536s (+19.5% 🔺)54.278s (+17.8% 🔺)0.742s21.04x
▲ VercelNitro55.613s (+26.3% 🔺)56.634s (+24.7% 🔺)1.021s21.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.454s55.097s0.643s21.00x
💻 LocalNext.js (Turbopack)56.008s56.107s0.099s21.03x
💻 LocalExpress57.304s (+2.3%)58.098s (+3.6%)0.794s21.05x
💻 LocalNitro57.494s (~)58.106s (~)0.612s21.06x
🌐 MongoDBNext.js (Turbopack)60.847s61.065s0.218s21.12x
🐘 PostgresNext.js (Turbopack)71.530s72.161s0.631s21.31x
🐘 PostgresNitro100.228s (~)100.234s (-1.0%)0.006s11.84x
🐘 PostgresExpress100.245s (~)101.244s (+1.0%)0.999s11.84x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.956s (+2.0%)92.604s (+1.0%)0.648s11.00x
▲ VercelNext.js (Turbopack)97.319s (+5.3% 🔺)99.055s (+6.1% 🔺)1.736s11.06x
▲ VercelExpress105.381s (+17.3% 🔺)106.071s (+16.4% 🔺)0.690s11.15x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.243s2.006s0.763s151.00x
💻 LocalNext.js (Turbopack)1.387s2.005s0.618s151.12x
💻 LocalExpress1.411s (+2.9%)2.006s (~)0.595s151.13x
💻 LocalNitro1.438s (+1.8%)2.006s (~)0.568s151.16x
🐘 PostgresNext.js (Turbopack)2.038s2.297s0.259s141.64x
🌐 MongoDBNext.js (Turbopack)2.137s3.007s0.870s101.72x
🐘 PostgresExpress2.294s (+2.7%)3.015s (~)0.721s101.84x
🐘 PostgresNitro2.309s (-4.4%)3.014s (~)0.705s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.812s (+9.3% 🔺)3.766s (+10.0% 🔺)0.954s81.00x
▲ VercelExpress2.869s (+11.7% 🔺)3.963s (+14.6% 🔺)1.094s81.02x
▲ VercelNext.js (Turbopack)3.053s (-0.7%)3.991s (-3.9%)0.938s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.404s3.007s0.603s101.00x
🌐 RedisNext.js (Turbopack)2.475s3.007s0.532s101.03x
💻 LocalExpress2.592s (+10.4% 🔺)3.007s (~)0.416s101.08x
💻 LocalNitro2.694s (+2.9%)3.008s (~)0.314s101.12x
🌐 MongoDBNext.js (Turbopack)4.678s5.176s0.498s61.95x
🐘 PostgresExpress8.735s (-0.5%)9.032s (-2.8%)0.297s43.63x
🐘 PostgresNitro9.251s (-3.1%)9.787s (-2.5%)0.537s43.85x
🐘 PostgresNext.js (Turbopack)10.773s11.036s0.263s34.48x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.707s (-33.0% 🟢)3.539s (-33.9% 🟢)0.832s91.00x
▲ VercelNext.js (Turbopack)2.980s (+8.6% 🔺)3.991s (+9.8% 🔺)1.010s81.10x
▲ VercelExpress3.179s (+8.9% 🔺)4.159s (+6.4% 🔺)0.981s81.17x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.080s4.867s0.786s71.00x
💻 LocalNext.js (Turbopack)6.763s7.215s0.452s51.66x
💻 LocalExpress7.457s (+15.1% 🔺)8.016s (+14.3% 🔺)0.559s41.83x
💻 LocalNitro7.814s (+5.0% 🔺)8.271s (+3.1%)0.456s41.92x
🌐 MongoDBNext.js (Turbopack)9.892s10.346s0.454s32.42x
🐘 PostgresNitro47.939s (+4.4%)48.145s (+4.4%)0.206s111.75x
🐘 PostgresExpress49.134s (+4.8%)50.148s (+6.4% 🔺)1.014s112.04x
🐘 PostgresNext.js (Turbopack)50.848s51.123s0.275s112.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.480s (+59.1% 🔺)7.709s (+49.5% 🔺)1.229s51.00x
▲ VercelExpress7.002s (+92.1% 🔺)8.127s (+74.4% 🔺)1.125s41.08x
▲ VercelNext.js (Turbopack)9.671s (+131.0% 🔺)10.844s (+107.7% 🔺)1.172s31.49x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.262s2.006s0.744s151.00x
💻 LocalNext.js (Turbopack)1.421s2.004s0.583s151.13x
💻 LocalNitro1.422s (+1.2%)2.005s (~)0.583s151.13x
💻 LocalExpress1.424s (+3.8%)2.005s (~)0.581s151.13x
🐘 PostgresNitro2.029s (+12.2% 🔺)2.397s (~)0.368s131.61x
🐘 PostgresExpress2.049s (-6.0% 🟢)2.924s (+6.7% 🔺)0.875s111.62x
🐘 PostgresNext.js (Turbopack)2.153s2.830s0.678s111.71x
🌐 MongoDBNext.js (Turbopack)2.172s3.008s0.836s101.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.393s (-2.3%)3.369s (-3.4%)0.977s91.00x
▲ VercelNitro2.671s (+11.6% 🔺)3.622s (+7.4% 🔺)0.951s91.12x
▲ VercelExpress3.523s (+21.1% 🔺)4.331s (+13.5% 🔺)0.807s81.47x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.457s3.007s0.551s101.00x
🌐 RedisNext.js (Turbopack)2.494s3.008s0.514s101.02x
💻 LocalExpress2.738s (+10.3% 🔺)3.007s (~)0.269s101.11x
💻 LocalNitro2.796s (+3.7%)3.009s (~)0.213s101.14x
🌐 MongoDBNext.js (Turbopack)4.673s5.176s0.503s61.90x
🐘 PostgresExpress8.599s (-30.0% 🟢)9.278s (-25.0% 🟢)0.679s43.50x
🐘 PostgresNitro10.123s (-11.0% 🟢)10.699s (-11.1% 🟢)0.577s34.12x
🐘 PostgresNext.js (Turbopack)12.685s13.369s0.684s35.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.463s (-17.8% 🟢)3.257s (-14.2% 🟢)0.794s101.00x
▲ VercelNitro2.514s (+3.1%)3.472s (+5.6% 🔺)0.957s91.02x
▲ VercelNext.js (Turbopack)3.549s (+22.9% 🔺)4.411s (+14.9% 🔺)0.863s71.44x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.108s4.868s0.760s71.00x
💻 LocalNext.js (Turbopack)7.195s7.613s0.418s51.75x
💻 LocalExpress7.955s (+9.6% 🔺)8.770s (+9.4% 🔺)0.815s41.94x
💻 LocalNitro8.409s (+5.9% 🔺)9.022s (+9.1% 🔺)0.614s42.05x
🌐 MongoDBNext.js (Turbopack)9.893s10.347s0.455s32.41x
🐘 PostgresExpress46.892s (-4.8%)47.127s (-6.0% 🟢)0.235s111.41x
🐘 PostgresNitro48.666s (-0.9%)49.118s (-2.0%)0.452s111.85x
🐘 PostgresNext.js (Turbopack)54.890s55.134s0.244s113.36x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.362s (-25.5% 🟢)6.455s (-24.5% 🟢)1.093s51.00x
▲ VercelNext.js (Turbopack)6.379s (-11.7% 🟢)7.613s (-11.1% 🟢)1.234s51.19x
▲ VercelExpress7.040s (+61.0% 🔺)8.169s (+49.1% 🔺)1.129s41.31x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.131s1.001s0.010s1.016s0.885s101.00x
🌐 RedisNext.js (Turbopack)0.144s1.000s0.001s1.007s0.863s101.10x
💻 LocalExpress0.172s (+49.6% 🔺)1.002s (~)0.011s (-1.9%)1.015s (~)0.843s101.31x
💻 LocalNitro0.177s (+2.0%)1.003s (~)0.011s (+1.9%)1.017s (~)0.840s101.35x
🌐 MongoDBNext.js (Turbopack)0.483s0.965s0.001s1.008s0.525s103.68x
🐘 PostgresNext.js (Turbopack)0.697s0.860s0.001s1.010s0.313s105.30x
🐘 PostgresNitro2.335s (-4.7%)2.709s (+4.6%)0.001s (~)3.015s (~)0.681s1017.77x
🐘 PostgresExpress2.351s (+2.6%)2.693s (-2.1%)0.001s (-7.1% 🟢)3.015s (~)0.664s1017.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.927s (-9.8% 🟢)2.645s (~)0.216s (-14.7% 🟢)3.413s (-0.9%)1.486s101.00x
▲ VercelExpress2.045s (-6.0% 🟢)2.711s (-2.9%)0.150s (-46.1% 🟢)3.455s (-6.1% 🟢)1.410s101.06x
▲ VercelNext.js (Turbopack)2.120s (-10.3% 🟢)2.769s (+4.0%)0.166s (-38.3% 🟢)3.524s (-1.9%)1.404s101.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)💻 Local6/12
Nitro💻 Local9/12
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

@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production501038539
✅ 💻 Local Development520068588
✅ 📦 Local Production520068588
✅ 🐘 Local Postgres520068588
✅ 🪟 Windows460349
❌ 🌍 Community Worlds105429156
✅ 📋 Other126021147
Total2338422752655

❌ Failed Tests

🌍 Community Worlds (42 failed)

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • 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
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4504
✅ example4504
✅ express4504
✅ fastify4504
✅ hono4504
✅ nextjs-turbopack4801
✅ nextjs-webpack4801
✅ nitro4504
✅ nuxt4504
✅ sveltekit4504
✅ vite4504
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4603
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4603
✅ redis-dev300
✅ redis4603
✅ turso-dev300
❌ turso4423
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4207
✅ e2e-local-postgres-nest-stable4207
✅ e2e-local-prod-nest-stable4207

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces manual authentication file reading with the @vercel/cli-auth package, adding automatic OAuth token refresh functionality. Previously, the CLI would read the auth token from disk without any refresh logic, causing API calls to fail when tokens expired. Now, getAuthToken() automatically checks token expiry and refreshes expired tokens using stored refresh tokens.

Changes:

  • Integrated @vercel/cli-auth package (v0.0.1) for credential management and OAuth refresh
  • Refactored authentication logic to support automatic token refresh before expiry
  • Simplified error messages by removing references to manual vercel env pull commands

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdded @vercel/cli-auth@0.0.1 and its dependencies (async-listen, open@8.4.0)
packages/cli/package.jsonAdded @vercel/cli-auth as a dependency
packages/cli/src/lib/inspect/auth.tsComplete refactor: replaced manual file reading with CredentialsStore and added OAuth token refresh logic
packages/cli/src/lib/inspect/env.tsUpdated to use async getAuthToken() instead of sync getAuth()
packages/cli/src/lib/inspect/vercel-api.tsRemoved reference to vercel env pull from error message
packages/errors/src/index.tsRemoved reference to vercel env pull from VERCEL_403_ERROR_MESSAGE
.changeset/free-carrots-repair.mdAdded changeset documenting the change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to +61
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The version is hardcoded as '0.0.0' but should use the actual CLI version. Other commands in the codebase use this.config.version from oclif to get the version dynamically. However, since this is not in a command class context, consider passing the version as a parameter to getAuthToken() or importing it from package.json. This is important for proper user-agent tracking and debugging.

Copilot uses AI. Check for mistakes.
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token expiry check uses >= which means a token is considered valid even when expiresAt equals the current time. This could lead to using an expired token. Consider using > instead to ensure the token has not yet expired, or add a small buffer (e.g., 60 seconds) to refresh tokens before they actually expire.

Suggested change
if(credentials.expiresAt>=nowInSeconds){
if(credentials.expiresAt>nowInSeconds){

Copilot uses AI. Check for mistakes.
Comment on lines +27 to 88
export async function getAuthToken(): Promise<string | null> {
let credentials: Credentials;
try {
credentials = store.get();
} catch {
return null;
}
if (!credentials?.token) {
return null;
}

import fs from 'node:fs';
import path from 'node:path';
import XDGAppPaths from 'xdg-app-paths';
import { z } from 'zod';
// If there's no expiration info, assume the token is valid
// (e.g. legacy tokens without OAuth)
if (typeof credentials.expiresAt !== 'number') {
return credentials.token;
}

// Types aren't inferred correctly. Typescript wants us to call `.default` on the imported module,
// but the actual underlying JS code exposes the code top-level, so we need to cast it here.
const getXDGAppPaths = (app: string) => {
return (
XDGAppPaths as unknown as (app: string) => { dataDirs: () => string[] }
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {
// Token is still valid
return credentials.token;
}

const vercelDirectories = getXDGAppPaths('com.vercel.cli').dataDirs();
// Token is expired — attempt refresh
if (!credentials.refreshToken) {
logger.debug('Auth token expired and no refresh token available');
return null;
}

const AuthFile = z.object({
token: z.string().min(1),
refresh_token: z.string().min(1).optional(),
expiresAt: z.number().optional(),
});
logger.debug('Auth token expired, refreshing via OAuth...');
try {
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

type AuthFile = z.infer<typeof AuthFile>;
const oauth = OAuth({
issuer: VERCEL_ISSUER,
clientId: VERCEL_CLI_CLIENT_ID,
userAgent,
});
const client = await oauth.init();
const tokenSet = await client.refreshToken(credentials.refreshToken);

// Returns whether a directory exists
const isDirectory = (path: string): boolean => {
try {
return fs.lstatSync(path).isDirectory();
} catch (_) {
// We don't care which kind of error occured, it isn't a directory anyway.
return false;
}
};
const updatedCredentials = {
...credentials,
token: tokenSet.access_token,
expiresAt: Math.floor(Date.now() / 1000) + tokenSet.expires_in,
...(tokenSet.refresh_token
? { refreshToken: tokenSet.refresh_token }
: {}),
};

// Returns in which directory the config should be present
const getGlobalPathConfig = (): string => {
// The customPath flag is the preferred location,
// followed by the vercel directory.
// (Legacy "now" directory is no longer supported)
// If none of those exist, use the vercel directory.
return (
vercelDirectories.find((configPath) => isDirectory(configPath)) ||
vercelDirectories[0]
);
};
store.update(updatedCredentials);
logger.debug('Auth token refreshed successfully');

export const getAuth = () => {
try {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
return AuthFile.parse(JSON.parse(fs.readFileSync(pathname, 'utf8')));
} catch {
return tokenSet.access_token;
} catch (error) {
logger.debug('Failed to refresh auth token:', error);
return null;
}
};

export async function updateAuthConfig(
config: Partial<AuthFile>
): Promise<void> {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
fs.mkdirSync(path.dirname(pathname), { recursive: true });
fs.writeFileSync(pathname, JSON.stringify(config, null, 2) + '\n');
}

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token refresh logic lacks protection against concurrent refresh attempts. If getAuthToken() is called multiple times simultaneously while a token is expired, multiple refresh requests could be initiated in parallel, potentially causing race conditions. Consider implementing a mutex or promise caching mechanism to ensure only one refresh happens at a time.

Copilot uses AI. Check for mistakes.
let credentials: Credentials;
try {
credentials = store.get();
} catch {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The error when reading credentials is caught and silently ignored. While this may be intentional for cases where credentials don't exist, it also silently hides other errors like permission issues or corrupted files. Consider logging these errors at debug level to aid troubleshooting, similar to how refresh errors are logged at line 85.

Suggested change
}catch{
}catch(error){
logger.debug('Failed to read auth credentials from store:',error);

Copilot uses AI. Check for mistakes.
"@workflow/builders": "workspace:*",
"@workflow/swc-plugin": "workspace:*",
"@workflow/utils": "workspace:*",
"@vercel/cli-auth": "0.0.1",

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The @vercel/cli-auth package is at version 0.0.1, which indicates it's in very early development. Using such an early version in production could be risky as the API may be unstable and subject to breaking changes. Consider verifying that this is the intended version and that it's stable enough for production use.

Suggested change
"@vercel/cli-auth": "0.0.1",
"@vercel/cli-auth": "^1.0.0",

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate enabled auto-merge (squash) February 13, 2026 21:25
@TooTallNate
TooTallNate merged commit 8cfb438 into mainFeb 13, 2026
160 of 171 checks passed
@TooTallNate
TooTallNate deleted the 02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh branch February 13, 2026 21:46
Sign up for freeto 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.

4 participants

@TooTallNate@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Use @vercel/cli-auth for auth token reading and OAuth refresh - #1043

Merged
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh
Feb 13, 2026
Merged

Use @vercel/cli-auth for auth token reading and OAuth refresh#1043
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Replace the manual auth.json reading logic in the CLI with the @vercel/cli-auth package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.

Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.

Replace the manual auth.json reading logic in the CLI with the `@vercel/cli-auth` package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.
Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.
@changeset-bot

changeset-botBot commented Feb 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8dbf9a9

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

This PR includes changesets to release 14 packages
NameType
@workflow/cliPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

@TooTallNate
TooTallNate marked this pull request as ready for review February 13, 2026 19:19
CopilotAI review requested due to automatic review settings February 13, 2026 19:19
@vercel

vercelBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

@TooTallNate
TooTallNate requested review from a team and removed request for CopilotFebruary 13, 2026 19:20
@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.032s (+14.9% 🔺)1.005s (~)0.974s101.00x
💻 LocalNitro0.033s (+2.2%)1.005s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.035s1.005s0.970s101.11x
🌐 RedisNext.js (Turbopack)0.043s1.005s0.961s101.37x
🌐 MongoDBNext.js (Turbopack)0.074s1.007s0.932s102.34x
🐘 PostgresExpress0.137s (+49.3% 🔺)1.011s (~)0.874s104.31x
🐘 PostgresNitro0.340s (+61.4% 🔺)1.012s (~)0.672s1010.73x
🐘 PostgresNext.js (Turbopack)0.436s1.009s0.573s1013.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.564s (-24.9% 🟢)2.009s (-1.4%)1.444s101.00x
▲ VercelNext.js (Turbopack)0.600s (-13.1% 🟢)2.053s (-4.1%)1.453s101.06x
▲ VercelNitro0.612s (+2.0%)2.052s (+2.9%)1.440s101.08x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.086s2.005s0.919s101.00x
💻 LocalExpress1.105s (+2.4%)2.006s (~)0.901s101.02x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.02x
🌐 RedisNext.js (Turbopack)1.109s2.006s0.897s101.02x
🌐 MongoDBNext.js (Turbopack)1.296s2.006s0.710s101.19x
🐘 PostgresNext.js (Turbopack)1.815s2.012s0.197s101.67x
🐘 PostgresNitro2.391s (-1.9%)3.014s (~)0.624s102.20x
🐘 PostgresExpress2.460s (~)3.014s (~)0.554s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.377s (-1.1%)3.225s (+2.5%)0.848s101.00x
▲ VercelNext.js (Turbopack)2.484s (-4.4%)3.426s (~)0.942s101.04x
▲ VercelNitro3.138s (+26.6% 🔺)4.160s (+19.3% 🔺)1.022s101.32x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.645s11.021s0.376s31.00x
🌐 RedisNext.js (Turbopack)10.722s11.022s0.300s31.01x
💻 LocalNitro10.831s (~)11.022s (~)0.191s31.02x
💻 LocalExpress10.832s (+2.3%)11.023s (~)0.191s31.02x
🌐 MongoDBNext.js (Turbopack)12.197s13.013s0.816s31.15x
🐘 PostgresNext.js (Turbopack)14.800s15.041s0.241s21.39x
🐘 PostgresNitro20.247s (~)21.059s (~)0.812s21.90x
🐘 PostgresExpress20.317s (~)21.059s (~)0.742s21.91x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.813s (-3.0%)19.224s (-1.9%)1.411s21.00x
▲ VercelExpress18.124s (-1.3%)19.409s (-1.9%)1.285s21.02x
▲ VercelNext.js (Turbopack)22.613s (+19.3% 🔺)24.038s (+18.8% 🔺)1.425s21.27x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.857s27.050s0.193s31.00x
💻 LocalNext.js (Turbopack)26.923s27.053s0.130s31.00x
💻 LocalExpress27.497s (+2.3%)28.051s (+3.7%)0.554s31.02x
💻 LocalNitro27.532s (~)28.052s (~)0.519s31.03x
🌐 MongoDBNext.js (Turbopack)30.454s31.026s0.571s21.13x
🐘 PostgresNext.js (Turbopack)37.396s38.085s0.689s21.39x
🐘 PostgresExpress50.339s (~)51.127s (+1.0%)0.788s21.87x
🐘 PostgresNitro50.541s (~)51.128s (~)0.588s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)51.638s (+13.8% 🔺)52.494s (+13.6% 🔺)0.856s21.00x
▲ VercelExpress53.536s (+19.5% 🔺)54.278s (+17.8% 🔺)0.742s21.04x
▲ VercelNitro55.613s (+26.3% 🔺)56.634s (+24.7% 🔺)1.021s21.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.454s55.097s0.643s21.00x
💻 LocalNext.js (Turbopack)56.008s56.107s0.099s21.03x
💻 LocalExpress57.304s (+2.3%)58.098s (+3.6%)0.794s21.05x
💻 LocalNitro57.494s (~)58.106s (~)0.612s21.06x
🌐 MongoDBNext.js (Turbopack)60.847s61.065s0.218s21.12x
🐘 PostgresNext.js (Turbopack)71.530s72.161s0.631s21.31x
🐘 PostgresNitro100.228s (~)100.234s (-1.0%)0.006s11.84x
🐘 PostgresExpress100.245s (~)101.244s (+1.0%)0.999s11.84x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.956s (+2.0%)92.604s (+1.0%)0.648s11.00x
▲ VercelNext.js (Turbopack)97.319s (+5.3% 🔺)99.055s (+6.1% 🔺)1.736s11.06x
▲ VercelExpress105.381s (+17.3% 🔺)106.071s (+16.4% 🔺)0.690s11.15x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.243s2.006s0.763s151.00x
💻 LocalNext.js (Turbopack)1.387s2.005s0.618s151.12x
💻 LocalExpress1.411s (+2.9%)2.006s (~)0.595s151.13x
💻 LocalNitro1.438s (+1.8%)2.006s (~)0.568s151.16x
🐘 PostgresNext.js (Turbopack)2.038s2.297s0.259s141.64x
🌐 MongoDBNext.js (Turbopack)2.137s3.007s0.870s101.72x
🐘 PostgresExpress2.294s (+2.7%)3.015s (~)0.721s101.84x
🐘 PostgresNitro2.309s (-4.4%)3.014s (~)0.705s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.812s (+9.3% 🔺)3.766s (+10.0% 🔺)0.954s81.00x
▲ VercelExpress2.869s (+11.7% 🔺)3.963s (+14.6% 🔺)1.094s81.02x
▲ VercelNext.js (Turbopack)3.053s (-0.7%)3.991s (-3.9%)0.938s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.404s3.007s0.603s101.00x
🌐 RedisNext.js (Turbopack)2.475s3.007s0.532s101.03x
💻 LocalExpress2.592s (+10.4% 🔺)3.007s (~)0.416s101.08x
💻 LocalNitro2.694s (+2.9%)3.008s (~)0.314s101.12x
🌐 MongoDBNext.js (Turbopack)4.678s5.176s0.498s61.95x
🐘 PostgresExpress8.735s (-0.5%)9.032s (-2.8%)0.297s43.63x
🐘 PostgresNitro9.251s (-3.1%)9.787s (-2.5%)0.537s43.85x
🐘 PostgresNext.js (Turbopack)10.773s11.036s0.263s34.48x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.707s (-33.0% 🟢)3.539s (-33.9% 🟢)0.832s91.00x
▲ VercelNext.js (Turbopack)2.980s (+8.6% 🔺)3.991s (+9.8% 🔺)1.010s81.10x
▲ VercelExpress3.179s (+8.9% 🔺)4.159s (+6.4% 🔺)0.981s81.17x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.080s4.867s0.786s71.00x
💻 LocalNext.js (Turbopack)6.763s7.215s0.452s51.66x
💻 LocalExpress7.457s (+15.1% 🔺)8.016s (+14.3% 🔺)0.559s41.83x
💻 LocalNitro7.814s (+5.0% 🔺)8.271s (+3.1%)0.456s41.92x
🌐 MongoDBNext.js (Turbopack)9.892s10.346s0.454s32.42x
🐘 PostgresNitro47.939s (+4.4%)48.145s (+4.4%)0.206s111.75x
🐘 PostgresExpress49.134s (+4.8%)50.148s (+6.4% 🔺)1.014s112.04x
🐘 PostgresNext.js (Turbopack)50.848s51.123s0.275s112.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.480s (+59.1% 🔺)7.709s (+49.5% 🔺)1.229s51.00x
▲ VercelExpress7.002s (+92.1% 🔺)8.127s (+74.4% 🔺)1.125s41.08x
▲ VercelNext.js (Turbopack)9.671s (+131.0% 🔺)10.844s (+107.7% 🔺)1.172s31.49x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.262s2.006s0.744s151.00x
💻 LocalNext.js (Turbopack)1.421s2.004s0.583s151.13x
💻 LocalNitro1.422s (+1.2%)2.005s (~)0.583s151.13x
💻 LocalExpress1.424s (+3.8%)2.005s (~)0.581s151.13x
🐘 PostgresNitro2.029s (+12.2% 🔺)2.397s (~)0.368s131.61x
🐘 PostgresExpress2.049s (-6.0% 🟢)2.924s (+6.7% 🔺)0.875s111.62x
🐘 PostgresNext.js (Turbopack)2.153s2.830s0.678s111.71x
🌐 MongoDBNext.js (Turbopack)2.172s3.008s0.836s101.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.393s (-2.3%)3.369s (-3.4%)0.977s91.00x
▲ VercelNitro2.671s (+11.6% 🔺)3.622s (+7.4% 🔺)0.951s91.12x
▲ VercelExpress3.523s (+21.1% 🔺)4.331s (+13.5% 🔺)0.807s81.47x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.457s3.007s0.551s101.00x
🌐 RedisNext.js (Turbopack)2.494s3.008s0.514s101.02x
💻 LocalExpress2.738s (+10.3% 🔺)3.007s (~)0.269s101.11x
💻 LocalNitro2.796s (+3.7%)3.009s (~)0.213s101.14x
🌐 MongoDBNext.js (Turbopack)4.673s5.176s0.503s61.90x
🐘 PostgresExpress8.599s (-30.0% 🟢)9.278s (-25.0% 🟢)0.679s43.50x
🐘 PostgresNitro10.123s (-11.0% 🟢)10.699s (-11.1% 🟢)0.577s34.12x
🐘 PostgresNext.js (Turbopack)12.685s13.369s0.684s35.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.463s (-17.8% 🟢)3.257s (-14.2% 🟢)0.794s101.00x
▲ VercelNitro2.514s (+3.1%)3.472s (+5.6% 🔺)0.957s91.02x
▲ VercelNext.js (Turbopack)3.549s (+22.9% 🔺)4.411s (+14.9% 🔺)0.863s71.44x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.108s4.868s0.760s71.00x
💻 LocalNext.js (Turbopack)7.195s7.613s0.418s51.75x
💻 LocalExpress7.955s (+9.6% 🔺)8.770s (+9.4% 🔺)0.815s41.94x
💻 LocalNitro8.409s (+5.9% 🔺)9.022s (+9.1% 🔺)0.614s42.05x
🌐 MongoDBNext.js (Turbopack)9.893s10.347s0.455s32.41x
🐘 PostgresExpress46.892s (-4.8%)47.127s (-6.0% 🟢)0.235s111.41x
🐘 PostgresNitro48.666s (-0.9%)49.118s (-2.0%)0.452s111.85x
🐘 PostgresNext.js (Turbopack)54.890s55.134s0.244s113.36x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.362s (-25.5% 🟢)6.455s (-24.5% 🟢)1.093s51.00x
▲ VercelNext.js (Turbopack)6.379s (-11.7% 🟢)7.613s (-11.1% 🟢)1.234s51.19x
▲ VercelExpress7.040s (+61.0% 🔺)8.169s (+49.1% 🔺)1.129s41.31x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.131s1.001s0.010s1.016s0.885s101.00x
🌐 RedisNext.js (Turbopack)0.144s1.000s0.001s1.007s0.863s101.10x
💻 LocalExpress0.172s (+49.6% 🔺)1.002s (~)0.011s (-1.9%)1.015s (~)0.843s101.31x
💻 LocalNitro0.177s (+2.0%)1.003s (~)0.011s (+1.9%)1.017s (~)0.840s101.35x
🌐 MongoDBNext.js (Turbopack)0.483s0.965s0.001s1.008s0.525s103.68x
🐘 PostgresNext.js (Turbopack)0.697s0.860s0.001s1.010s0.313s105.30x
🐘 PostgresNitro2.335s (-4.7%)2.709s (+4.6%)0.001s (~)3.015s (~)0.681s1017.77x
🐘 PostgresExpress2.351s (+2.6%)2.693s (-2.1%)0.001s (-7.1% 🟢)3.015s (~)0.664s1017.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.927s (-9.8% 🟢)2.645s (~)0.216s (-14.7% 🟢)3.413s (-0.9%)1.486s101.00x
▲ VercelExpress2.045s (-6.0% 🟢)2.711s (-2.9%)0.150s (-46.1% 🟢)3.455s (-6.1% 🟢)1.410s101.06x
▲ VercelNext.js (Turbopack)2.120s (-10.3% 🟢)2.769s (+4.0%)0.166s (-38.3% 🟢)3.524s (-1.9%)1.404s101.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)💻 Local6/12
Nitro💻 Local9/12
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

@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production501038539
✅ 💻 Local Development520068588
✅ 📦 Local Production520068588
✅ 🐘 Local Postgres520068588
✅ 🪟 Windows460349
❌ 🌍 Community Worlds105429156
✅ 📋 Other126021147
Total2338422752655

❌ Failed Tests

🌍 Community Worlds (42 failed)

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • 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
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4504
✅ example4504
✅ express4504
✅ fastify4504
✅ hono4504
✅ nextjs-turbopack4801
✅ nextjs-webpack4801
✅ nitro4504
✅ nuxt4504
✅ sveltekit4504
✅ vite4504
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4603
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4603
✅ redis-dev300
✅ redis4603
✅ turso-dev300
❌ turso4423
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4207
✅ e2e-local-postgres-nest-stable4207
✅ e2e-local-prod-nest-stable4207

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces manual authentication file reading with the @vercel/cli-auth package, adding automatic OAuth token refresh functionality. Previously, the CLI would read the auth token from disk without any refresh logic, causing API calls to fail when tokens expired. Now, getAuthToken() automatically checks token expiry and refreshes expired tokens using stored refresh tokens.

Changes:

  • Integrated @vercel/cli-auth package (v0.0.1) for credential management and OAuth refresh
  • Refactored authentication logic to support automatic token refresh before expiry
  • Simplified error messages by removing references to manual vercel env pull commands

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdded @vercel/cli-auth@0.0.1 and its dependencies (async-listen, open@8.4.0)
packages/cli/package.jsonAdded @vercel/cli-auth as a dependency
packages/cli/src/lib/inspect/auth.tsComplete refactor: replaced manual file reading with CredentialsStore and added OAuth token refresh logic
packages/cli/src/lib/inspect/env.tsUpdated to use async getAuthToken() instead of sync getAuth()
packages/cli/src/lib/inspect/vercel-api.tsRemoved reference to vercel env pull from error message
packages/errors/src/index.tsRemoved reference to vercel env pull from VERCEL_403_ERROR_MESSAGE
.changeset/free-carrots-repair.mdAdded changeset documenting the change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to +61
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The version is hardcoded as '0.0.0' but should use the actual CLI version. Other commands in the codebase use this.config.version from oclif to get the version dynamically. However, since this is not in a command class context, consider passing the version as a parameter to getAuthToken() or importing it from package.json. This is important for proper user-agent tracking and debugging.

Copilot uses AI. Check for mistakes.
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token expiry check uses >= which means a token is considered valid even when expiresAt equals the current time. This could lead to using an expired token. Consider using > instead to ensure the token has not yet expired, or add a small buffer (e.g., 60 seconds) to refresh tokens before they actually expire.

Suggested change
if(credentials.expiresAt>=nowInSeconds){
if(credentials.expiresAt>nowInSeconds){

Copilot uses AI. Check for mistakes.
Comment on lines +27 to 88
export async function getAuthToken(): Promise<string | null> {
let credentials: Credentials;
try {
credentials = store.get();
} catch {
return null;
}
if (!credentials?.token) {
return null;
}

import fs from 'node:fs';
import path from 'node:path';
import XDGAppPaths from 'xdg-app-paths';
import { z } from 'zod';
// If there's no expiration info, assume the token is valid
// (e.g. legacy tokens without OAuth)
if (typeof credentials.expiresAt !== 'number') {
return credentials.token;
}

// Types aren't inferred correctly. Typescript wants us to call `.default` on the imported module,
// but the actual underlying JS code exposes the code top-level, so we need to cast it here.
const getXDGAppPaths = (app: string) => {
return (
XDGAppPaths as unknown as (app: string) => { dataDirs: () => string[] }
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {
// Token is still valid
return credentials.token;
}

const vercelDirectories = getXDGAppPaths('com.vercel.cli').dataDirs();
// Token is expired — attempt refresh
if (!credentials.refreshToken) {
logger.debug('Auth token expired and no refresh token available');
return null;
}

const AuthFile = z.object({
token: z.string().min(1),
refresh_token: z.string().min(1).optional(),
expiresAt: z.number().optional(),
});
logger.debug('Auth token expired, refreshing via OAuth...');
try {
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

type AuthFile = z.infer<typeof AuthFile>;
const oauth = OAuth({
issuer: VERCEL_ISSUER,
clientId: VERCEL_CLI_CLIENT_ID,
userAgent,
});
const client = await oauth.init();
const tokenSet = await client.refreshToken(credentials.refreshToken);

// Returns whether a directory exists
const isDirectory = (path: string): boolean => {
try {
return fs.lstatSync(path).isDirectory();
} catch (_) {
// We don't care which kind of error occured, it isn't a directory anyway.
return false;
}
};
const updatedCredentials = {
...credentials,
token: tokenSet.access_token,
expiresAt: Math.floor(Date.now() / 1000) + tokenSet.expires_in,
...(tokenSet.refresh_token
? { refreshToken: tokenSet.refresh_token }
: {}),
};

// Returns in which directory the config should be present
const getGlobalPathConfig = (): string => {
// The customPath flag is the preferred location,
// followed by the vercel directory.
// (Legacy "now" directory is no longer supported)
// If none of those exist, use the vercel directory.
return (
vercelDirectories.find((configPath) => isDirectory(configPath)) ||
vercelDirectories[0]
);
};
store.update(updatedCredentials);
logger.debug('Auth token refreshed successfully');

export const getAuth = () => {
try {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
return AuthFile.parse(JSON.parse(fs.readFileSync(pathname, 'utf8')));
} catch {
return tokenSet.access_token;
} catch (error) {
logger.debug('Failed to refresh auth token:', error);
return null;
}
};

export async function updateAuthConfig(
config: Partial<AuthFile>
): Promise<void> {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
fs.mkdirSync(path.dirname(pathname), { recursive: true });
fs.writeFileSync(pathname, JSON.stringify(config, null, 2) + '\n');
}

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token refresh logic lacks protection against concurrent refresh attempts. If getAuthToken() is called multiple times simultaneously while a token is expired, multiple refresh requests could be initiated in parallel, potentially causing race conditions. Consider implementing a mutex or promise caching mechanism to ensure only one refresh happens at a time.

Copilot uses AI. Check for mistakes.
let credentials: Credentials;
try {
credentials = store.get();
} catch {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The error when reading credentials is caught and silently ignored. While this may be intentional for cases where credentials don't exist, it also silently hides other errors like permission issues or corrupted files. Consider logging these errors at debug level to aid troubleshooting, similar to how refresh errors are logged at line 85.

Suggested change
}catch{
}catch(error){
logger.debug('Failed to read auth credentials from store:',error);

Copilot uses AI. Check for mistakes.
"@workflow/builders": "workspace:*",
"@workflow/swc-plugin": "workspace:*",
"@workflow/utils": "workspace:*",
"@vercel/cli-auth": "0.0.1",

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The @vercel/cli-auth package is at version 0.0.1, which indicates it's in very early development. Using such an early version in production could be risky as the API may be unstable and subject to breaking changes. Consider verifying that this is the intended version and that it's stable enough for production use.

Suggested change
"@vercel/cli-auth": "0.0.1",
"@vercel/cli-auth": "^1.0.0",

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate enabled auto-merge (squash) February 13, 2026 21:25
@TooTallNate
TooTallNate merged commit 8cfb438 into mainFeb 13, 2026
160 of 171 checks passed
@TooTallNate
TooTallNate deleted the 02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh branch February 13, 2026 21:46
Sign up for freeto 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.

4 participants

@TooTallNate@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Use @vercel/cli-auth for auth token reading and OAuth refresh - #1043

Merged
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh
Feb 13, 2026
Merged

Use @vercel/cli-auth for auth token reading and OAuth refresh#1043
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Replace the manual auth.json reading logic in the CLI with the @vercel/cli-auth package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.

Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.

Replace the manual auth.json reading logic in the CLI with the `@vercel/cli-auth` package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.
Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.
@changeset-bot

changeset-botBot commented Feb 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8dbf9a9

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

This PR includes changesets to release 14 packages
NameType
@workflow/cliPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

@TooTallNate
TooTallNate marked this pull request as ready for review February 13, 2026 19:19
CopilotAI review requested due to automatic review settings February 13, 2026 19:19
@vercel

vercelBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

@TooTallNate
TooTallNate requested review from a team and removed request for CopilotFebruary 13, 2026 19:20
@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.032s (+14.9% 🔺)1.005s (~)0.974s101.00x
💻 LocalNitro0.033s (+2.2%)1.005s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.035s1.005s0.970s101.11x
🌐 RedisNext.js (Turbopack)0.043s1.005s0.961s101.37x
🌐 MongoDBNext.js (Turbopack)0.074s1.007s0.932s102.34x
🐘 PostgresExpress0.137s (+49.3% 🔺)1.011s (~)0.874s104.31x
🐘 PostgresNitro0.340s (+61.4% 🔺)1.012s (~)0.672s1010.73x
🐘 PostgresNext.js (Turbopack)0.436s1.009s0.573s1013.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.564s (-24.9% 🟢)2.009s (-1.4%)1.444s101.00x
▲ VercelNext.js (Turbopack)0.600s (-13.1% 🟢)2.053s (-4.1%)1.453s101.06x
▲ VercelNitro0.612s (+2.0%)2.052s (+2.9%)1.440s101.08x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.086s2.005s0.919s101.00x
💻 LocalExpress1.105s (+2.4%)2.006s (~)0.901s101.02x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.02x
🌐 RedisNext.js (Turbopack)1.109s2.006s0.897s101.02x
🌐 MongoDBNext.js (Turbopack)1.296s2.006s0.710s101.19x
🐘 PostgresNext.js (Turbopack)1.815s2.012s0.197s101.67x
🐘 PostgresNitro2.391s (-1.9%)3.014s (~)0.624s102.20x
🐘 PostgresExpress2.460s (~)3.014s (~)0.554s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.377s (-1.1%)3.225s (+2.5%)0.848s101.00x
▲ VercelNext.js (Turbopack)2.484s (-4.4%)3.426s (~)0.942s101.04x
▲ VercelNitro3.138s (+26.6% 🔺)4.160s (+19.3% 🔺)1.022s101.32x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.645s11.021s0.376s31.00x
🌐 RedisNext.js (Turbopack)10.722s11.022s0.300s31.01x
💻 LocalNitro10.831s (~)11.022s (~)0.191s31.02x
💻 LocalExpress10.832s (+2.3%)11.023s (~)0.191s31.02x
🌐 MongoDBNext.js (Turbopack)12.197s13.013s0.816s31.15x
🐘 PostgresNext.js (Turbopack)14.800s15.041s0.241s21.39x
🐘 PostgresNitro20.247s (~)21.059s (~)0.812s21.90x
🐘 PostgresExpress20.317s (~)21.059s (~)0.742s21.91x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.813s (-3.0%)19.224s (-1.9%)1.411s21.00x
▲ VercelExpress18.124s (-1.3%)19.409s (-1.9%)1.285s21.02x
▲ VercelNext.js (Turbopack)22.613s (+19.3% 🔺)24.038s (+18.8% 🔺)1.425s21.27x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.857s27.050s0.193s31.00x
💻 LocalNext.js (Turbopack)26.923s27.053s0.130s31.00x
💻 LocalExpress27.497s (+2.3%)28.051s (+3.7%)0.554s31.02x
💻 LocalNitro27.532s (~)28.052s (~)0.519s31.03x
🌐 MongoDBNext.js (Turbopack)30.454s31.026s0.571s21.13x
🐘 PostgresNext.js (Turbopack)37.396s38.085s0.689s21.39x
🐘 PostgresExpress50.339s (~)51.127s (+1.0%)0.788s21.87x
🐘 PostgresNitro50.541s (~)51.128s (~)0.588s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)51.638s (+13.8% 🔺)52.494s (+13.6% 🔺)0.856s21.00x
▲ VercelExpress53.536s (+19.5% 🔺)54.278s (+17.8% 🔺)0.742s21.04x
▲ VercelNitro55.613s (+26.3% 🔺)56.634s (+24.7% 🔺)1.021s21.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.454s55.097s0.643s21.00x
💻 LocalNext.js (Turbopack)56.008s56.107s0.099s21.03x
💻 LocalExpress57.304s (+2.3%)58.098s (+3.6%)0.794s21.05x
💻 LocalNitro57.494s (~)58.106s (~)0.612s21.06x
🌐 MongoDBNext.js (Turbopack)60.847s61.065s0.218s21.12x
🐘 PostgresNext.js (Turbopack)71.530s72.161s0.631s21.31x
🐘 PostgresNitro100.228s (~)100.234s (-1.0%)0.006s11.84x
🐘 PostgresExpress100.245s (~)101.244s (+1.0%)0.999s11.84x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.956s (+2.0%)92.604s (+1.0%)0.648s11.00x
▲ VercelNext.js (Turbopack)97.319s (+5.3% 🔺)99.055s (+6.1% 🔺)1.736s11.06x
▲ VercelExpress105.381s (+17.3% 🔺)106.071s (+16.4% 🔺)0.690s11.15x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.243s2.006s0.763s151.00x
💻 LocalNext.js (Turbopack)1.387s2.005s0.618s151.12x
💻 LocalExpress1.411s (+2.9%)2.006s (~)0.595s151.13x
💻 LocalNitro1.438s (+1.8%)2.006s (~)0.568s151.16x
🐘 PostgresNext.js (Turbopack)2.038s2.297s0.259s141.64x
🌐 MongoDBNext.js (Turbopack)2.137s3.007s0.870s101.72x
🐘 PostgresExpress2.294s (+2.7%)3.015s (~)0.721s101.84x
🐘 PostgresNitro2.309s (-4.4%)3.014s (~)0.705s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.812s (+9.3% 🔺)3.766s (+10.0% 🔺)0.954s81.00x
▲ VercelExpress2.869s (+11.7% 🔺)3.963s (+14.6% 🔺)1.094s81.02x
▲ VercelNext.js (Turbopack)3.053s (-0.7%)3.991s (-3.9%)0.938s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.404s3.007s0.603s101.00x
🌐 RedisNext.js (Turbopack)2.475s3.007s0.532s101.03x
💻 LocalExpress2.592s (+10.4% 🔺)3.007s (~)0.416s101.08x
💻 LocalNitro2.694s (+2.9%)3.008s (~)0.314s101.12x
🌐 MongoDBNext.js (Turbopack)4.678s5.176s0.498s61.95x
🐘 PostgresExpress8.735s (-0.5%)9.032s (-2.8%)0.297s43.63x
🐘 PostgresNitro9.251s (-3.1%)9.787s (-2.5%)0.537s43.85x
🐘 PostgresNext.js (Turbopack)10.773s11.036s0.263s34.48x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.707s (-33.0% 🟢)3.539s (-33.9% 🟢)0.832s91.00x
▲ VercelNext.js (Turbopack)2.980s (+8.6% 🔺)3.991s (+9.8% 🔺)1.010s81.10x
▲ VercelExpress3.179s (+8.9% 🔺)4.159s (+6.4% 🔺)0.981s81.17x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.080s4.867s0.786s71.00x
💻 LocalNext.js (Turbopack)6.763s7.215s0.452s51.66x
💻 LocalExpress7.457s (+15.1% 🔺)8.016s (+14.3% 🔺)0.559s41.83x
💻 LocalNitro7.814s (+5.0% 🔺)8.271s (+3.1%)0.456s41.92x
🌐 MongoDBNext.js (Turbopack)9.892s10.346s0.454s32.42x
🐘 PostgresNitro47.939s (+4.4%)48.145s (+4.4%)0.206s111.75x
🐘 PostgresExpress49.134s (+4.8%)50.148s (+6.4% 🔺)1.014s112.04x
🐘 PostgresNext.js (Turbopack)50.848s51.123s0.275s112.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.480s (+59.1% 🔺)7.709s (+49.5% 🔺)1.229s51.00x
▲ VercelExpress7.002s (+92.1% 🔺)8.127s (+74.4% 🔺)1.125s41.08x
▲ VercelNext.js (Turbopack)9.671s (+131.0% 🔺)10.844s (+107.7% 🔺)1.172s31.49x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.262s2.006s0.744s151.00x
💻 LocalNext.js (Turbopack)1.421s2.004s0.583s151.13x
💻 LocalNitro1.422s (+1.2%)2.005s (~)0.583s151.13x
💻 LocalExpress1.424s (+3.8%)2.005s (~)0.581s151.13x
🐘 PostgresNitro2.029s (+12.2% 🔺)2.397s (~)0.368s131.61x
🐘 PostgresExpress2.049s (-6.0% 🟢)2.924s (+6.7% 🔺)0.875s111.62x
🐘 PostgresNext.js (Turbopack)2.153s2.830s0.678s111.71x
🌐 MongoDBNext.js (Turbopack)2.172s3.008s0.836s101.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.393s (-2.3%)3.369s (-3.4%)0.977s91.00x
▲ VercelNitro2.671s (+11.6% 🔺)3.622s (+7.4% 🔺)0.951s91.12x
▲ VercelExpress3.523s (+21.1% 🔺)4.331s (+13.5% 🔺)0.807s81.47x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.457s3.007s0.551s101.00x
🌐 RedisNext.js (Turbopack)2.494s3.008s0.514s101.02x
💻 LocalExpress2.738s (+10.3% 🔺)3.007s (~)0.269s101.11x
💻 LocalNitro2.796s (+3.7%)3.009s (~)0.213s101.14x
🌐 MongoDBNext.js (Turbopack)4.673s5.176s0.503s61.90x
🐘 PostgresExpress8.599s (-30.0% 🟢)9.278s (-25.0% 🟢)0.679s43.50x
🐘 PostgresNitro10.123s (-11.0% 🟢)10.699s (-11.1% 🟢)0.577s34.12x
🐘 PostgresNext.js (Turbopack)12.685s13.369s0.684s35.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.463s (-17.8% 🟢)3.257s (-14.2% 🟢)0.794s101.00x
▲ VercelNitro2.514s (+3.1%)3.472s (+5.6% 🔺)0.957s91.02x
▲ VercelNext.js (Turbopack)3.549s (+22.9% 🔺)4.411s (+14.9% 🔺)0.863s71.44x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.108s4.868s0.760s71.00x
💻 LocalNext.js (Turbopack)7.195s7.613s0.418s51.75x
💻 LocalExpress7.955s (+9.6% 🔺)8.770s (+9.4% 🔺)0.815s41.94x
💻 LocalNitro8.409s (+5.9% 🔺)9.022s (+9.1% 🔺)0.614s42.05x
🌐 MongoDBNext.js (Turbopack)9.893s10.347s0.455s32.41x
🐘 PostgresExpress46.892s (-4.8%)47.127s (-6.0% 🟢)0.235s111.41x
🐘 PostgresNitro48.666s (-0.9%)49.118s (-2.0%)0.452s111.85x
🐘 PostgresNext.js (Turbopack)54.890s55.134s0.244s113.36x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.362s (-25.5% 🟢)6.455s (-24.5% 🟢)1.093s51.00x
▲ VercelNext.js (Turbopack)6.379s (-11.7% 🟢)7.613s (-11.1% 🟢)1.234s51.19x
▲ VercelExpress7.040s (+61.0% 🔺)8.169s (+49.1% 🔺)1.129s41.31x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.131s1.001s0.010s1.016s0.885s101.00x
🌐 RedisNext.js (Turbopack)0.144s1.000s0.001s1.007s0.863s101.10x
💻 LocalExpress0.172s (+49.6% 🔺)1.002s (~)0.011s (-1.9%)1.015s (~)0.843s101.31x
💻 LocalNitro0.177s (+2.0%)1.003s (~)0.011s (+1.9%)1.017s (~)0.840s101.35x
🌐 MongoDBNext.js (Turbopack)0.483s0.965s0.001s1.008s0.525s103.68x
🐘 PostgresNext.js (Turbopack)0.697s0.860s0.001s1.010s0.313s105.30x
🐘 PostgresNitro2.335s (-4.7%)2.709s (+4.6%)0.001s (~)3.015s (~)0.681s1017.77x
🐘 PostgresExpress2.351s (+2.6%)2.693s (-2.1%)0.001s (-7.1% 🟢)3.015s (~)0.664s1017.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.927s (-9.8% 🟢)2.645s (~)0.216s (-14.7% 🟢)3.413s (-0.9%)1.486s101.00x
▲ VercelExpress2.045s (-6.0% 🟢)2.711s (-2.9%)0.150s (-46.1% 🟢)3.455s (-6.1% 🟢)1.410s101.06x
▲ VercelNext.js (Turbopack)2.120s (-10.3% 🟢)2.769s (+4.0%)0.166s (-38.3% 🟢)3.524s (-1.9%)1.404s101.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)💻 Local6/12
Nitro💻 Local9/12
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

@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production501038539
✅ 💻 Local Development520068588
✅ 📦 Local Production520068588
✅ 🐘 Local Postgres520068588
✅ 🪟 Windows460349
❌ 🌍 Community Worlds105429156
✅ 📋 Other126021147
Total2338422752655

❌ Failed Tests

🌍 Community Worlds (42 failed)

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • 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
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4504
✅ example4504
✅ express4504
✅ fastify4504
✅ hono4504
✅ nextjs-turbopack4801
✅ nextjs-webpack4801
✅ nitro4504
✅ nuxt4504
✅ sveltekit4504
✅ vite4504
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4603
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4603
✅ redis-dev300
✅ redis4603
✅ turso-dev300
❌ turso4423
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4207
✅ e2e-local-postgres-nest-stable4207
✅ e2e-local-prod-nest-stable4207

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces manual authentication file reading with the @vercel/cli-auth package, adding automatic OAuth token refresh functionality. Previously, the CLI would read the auth token from disk without any refresh logic, causing API calls to fail when tokens expired. Now, getAuthToken() automatically checks token expiry and refreshes expired tokens using stored refresh tokens.

Changes:

  • Integrated @vercel/cli-auth package (v0.0.1) for credential management and OAuth refresh
  • Refactored authentication logic to support automatic token refresh before expiry
  • Simplified error messages by removing references to manual vercel env pull commands

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdded @vercel/cli-auth@0.0.1 and its dependencies (async-listen, open@8.4.0)
packages/cli/package.jsonAdded @vercel/cli-auth as a dependency
packages/cli/src/lib/inspect/auth.tsComplete refactor: replaced manual file reading with CredentialsStore and added OAuth token refresh logic
packages/cli/src/lib/inspect/env.tsUpdated to use async getAuthToken() instead of sync getAuth()
packages/cli/src/lib/inspect/vercel-api.tsRemoved reference to vercel env pull from error message
packages/errors/src/index.tsRemoved reference to vercel env pull from VERCEL_403_ERROR_MESSAGE
.changeset/free-carrots-repair.mdAdded changeset documenting the change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to +61
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The version is hardcoded as '0.0.0' but should use the actual CLI version. Other commands in the codebase use this.config.version from oclif to get the version dynamically. However, since this is not in a command class context, consider passing the version as a parameter to getAuthToken() or importing it from package.json. This is important for proper user-agent tracking and debugging.

Copilot uses AI. Check for mistakes.
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token expiry check uses >= which means a token is considered valid even when expiresAt equals the current time. This could lead to using an expired token. Consider using > instead to ensure the token has not yet expired, or add a small buffer (e.g., 60 seconds) to refresh tokens before they actually expire.

Suggested change
if(credentials.expiresAt>=nowInSeconds){
if(credentials.expiresAt>nowInSeconds){

Copilot uses AI. Check for mistakes.
Comment on lines +27 to 88
export async function getAuthToken(): Promise<string | null> {
let credentials: Credentials;
try {
credentials = store.get();
} catch {
return null;
}
if (!credentials?.token) {
return null;
}

import fs from 'node:fs';
import path from 'node:path';
import XDGAppPaths from 'xdg-app-paths';
import { z } from 'zod';
// If there's no expiration info, assume the token is valid
// (e.g. legacy tokens without OAuth)
if (typeof credentials.expiresAt !== 'number') {
return credentials.token;
}

// Types aren't inferred correctly. Typescript wants us to call `.default` on the imported module,
// but the actual underlying JS code exposes the code top-level, so we need to cast it here.
const getXDGAppPaths = (app: string) => {
return (
XDGAppPaths as unknown as (app: string) => { dataDirs: () => string[] }
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {
// Token is still valid
return credentials.token;
}

const vercelDirectories = getXDGAppPaths('com.vercel.cli').dataDirs();
// Token is expired — attempt refresh
if (!credentials.refreshToken) {
logger.debug('Auth token expired and no refresh token available');
return null;
}

const AuthFile = z.object({
token: z.string().min(1),
refresh_token: z.string().min(1).optional(),
expiresAt: z.number().optional(),
});
logger.debug('Auth token expired, refreshing via OAuth...');
try {
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

type AuthFile = z.infer<typeof AuthFile>;
const oauth = OAuth({
issuer: VERCEL_ISSUER,
clientId: VERCEL_CLI_CLIENT_ID,
userAgent,
});
const client = await oauth.init();
const tokenSet = await client.refreshToken(credentials.refreshToken);

// Returns whether a directory exists
const isDirectory = (path: string): boolean => {
try {
return fs.lstatSync(path).isDirectory();
} catch (_) {
// We don't care which kind of error occured, it isn't a directory anyway.
return false;
}
};
const updatedCredentials = {
...credentials,
token: tokenSet.access_token,
expiresAt: Math.floor(Date.now() / 1000) + tokenSet.expires_in,
...(tokenSet.refresh_token
? { refreshToken: tokenSet.refresh_token }
: {}),
};

// Returns in which directory the config should be present
const getGlobalPathConfig = (): string => {
// The customPath flag is the preferred location,
// followed by the vercel directory.
// (Legacy "now" directory is no longer supported)
// If none of those exist, use the vercel directory.
return (
vercelDirectories.find((configPath) => isDirectory(configPath)) ||
vercelDirectories[0]
);
};
store.update(updatedCredentials);
logger.debug('Auth token refreshed successfully');

export const getAuth = () => {
try {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
return AuthFile.parse(JSON.parse(fs.readFileSync(pathname, 'utf8')));
} catch {
return tokenSet.access_token;
} catch (error) {
logger.debug('Failed to refresh auth token:', error);
return null;
}
};

export async function updateAuthConfig(
config: Partial<AuthFile>
): Promise<void> {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
fs.mkdirSync(path.dirname(pathname), { recursive: true });
fs.writeFileSync(pathname, JSON.stringify(config, null, 2) + '\n');
}

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token refresh logic lacks protection against concurrent refresh attempts. If getAuthToken() is called multiple times simultaneously while a token is expired, multiple refresh requests could be initiated in parallel, potentially causing race conditions. Consider implementing a mutex or promise caching mechanism to ensure only one refresh happens at a time.

Copilot uses AI. Check for mistakes.
let credentials: Credentials;
try {
credentials = store.get();
} catch {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The error when reading credentials is caught and silently ignored. While this may be intentional for cases where credentials don't exist, it also silently hides other errors like permission issues or corrupted files. Consider logging these errors at debug level to aid troubleshooting, similar to how refresh errors are logged at line 85.

Suggested change
}catch{
}catch(error){
logger.debug('Failed to read auth credentials from store:',error);

Copilot uses AI. Check for mistakes.
"@workflow/builders": "workspace:*",
"@workflow/swc-plugin": "workspace:*",
"@workflow/utils": "workspace:*",
"@vercel/cli-auth": "0.0.1",

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The @vercel/cli-auth package is at version 0.0.1, which indicates it's in very early development. Using such an early version in production could be risky as the API may be unstable and subject to breaking changes. Consider verifying that this is the intended version and that it's stable enough for production use.

Suggested change
"@vercel/cli-auth": "0.0.1",
"@vercel/cli-auth": "^1.0.0",

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate enabled auto-merge (squash) February 13, 2026 21:25
@TooTallNate
TooTallNate merged commit 8cfb438 into mainFeb 13, 2026
160 of 171 checks passed
@TooTallNate
TooTallNate deleted the 02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh branch February 13, 2026 21:46
Sign up for freeto 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.

4 participants

@TooTallNate@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Use @vercel/cli-auth for auth token reading and OAuth refresh - #1043

Merged
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh
Feb 13, 2026
Merged

Use @vercel/cli-auth for auth token reading and OAuth refresh#1043
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Replace the manual auth.json reading logic in the CLI with the @vercel/cli-auth package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.

Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.

Replace the manual auth.json reading logic in the CLI with the `@vercel/cli-auth` package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.
Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.
@changeset-bot

changeset-botBot commented Feb 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8dbf9a9

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

This PR includes changesets to release 14 packages
NameType
@workflow/cliPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

@TooTallNate
TooTallNate marked this pull request as ready for review February 13, 2026 19:19
CopilotAI review requested due to automatic review settings February 13, 2026 19:19
@vercel

vercelBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

@TooTallNate
TooTallNate requested review from a team and removed request for CopilotFebruary 13, 2026 19:20
@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.032s (+14.9% 🔺)1.005s (~)0.974s101.00x
💻 LocalNitro0.033s (+2.2%)1.005s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.035s1.005s0.970s101.11x
🌐 RedisNext.js (Turbopack)0.043s1.005s0.961s101.37x
🌐 MongoDBNext.js (Turbopack)0.074s1.007s0.932s102.34x
🐘 PostgresExpress0.137s (+49.3% 🔺)1.011s (~)0.874s104.31x
🐘 PostgresNitro0.340s (+61.4% 🔺)1.012s (~)0.672s1010.73x
🐘 PostgresNext.js (Turbopack)0.436s1.009s0.573s1013.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.564s (-24.9% 🟢)2.009s (-1.4%)1.444s101.00x
▲ VercelNext.js (Turbopack)0.600s (-13.1% 🟢)2.053s (-4.1%)1.453s101.06x
▲ VercelNitro0.612s (+2.0%)2.052s (+2.9%)1.440s101.08x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.086s2.005s0.919s101.00x
💻 LocalExpress1.105s (+2.4%)2.006s (~)0.901s101.02x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.02x
🌐 RedisNext.js (Turbopack)1.109s2.006s0.897s101.02x
🌐 MongoDBNext.js (Turbopack)1.296s2.006s0.710s101.19x
🐘 PostgresNext.js (Turbopack)1.815s2.012s0.197s101.67x
🐘 PostgresNitro2.391s (-1.9%)3.014s (~)0.624s102.20x
🐘 PostgresExpress2.460s (~)3.014s (~)0.554s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.377s (-1.1%)3.225s (+2.5%)0.848s101.00x
▲ VercelNext.js (Turbopack)2.484s (-4.4%)3.426s (~)0.942s101.04x
▲ VercelNitro3.138s (+26.6% 🔺)4.160s (+19.3% 🔺)1.022s101.32x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.645s11.021s0.376s31.00x
🌐 RedisNext.js (Turbopack)10.722s11.022s0.300s31.01x
💻 LocalNitro10.831s (~)11.022s (~)0.191s31.02x
💻 LocalExpress10.832s (+2.3%)11.023s (~)0.191s31.02x
🌐 MongoDBNext.js (Turbopack)12.197s13.013s0.816s31.15x
🐘 PostgresNext.js (Turbopack)14.800s15.041s0.241s21.39x
🐘 PostgresNitro20.247s (~)21.059s (~)0.812s21.90x
🐘 PostgresExpress20.317s (~)21.059s (~)0.742s21.91x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.813s (-3.0%)19.224s (-1.9%)1.411s21.00x
▲ VercelExpress18.124s (-1.3%)19.409s (-1.9%)1.285s21.02x
▲ VercelNext.js (Turbopack)22.613s (+19.3% 🔺)24.038s (+18.8% 🔺)1.425s21.27x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.857s27.050s0.193s31.00x
💻 LocalNext.js (Turbopack)26.923s27.053s0.130s31.00x
💻 LocalExpress27.497s (+2.3%)28.051s (+3.7%)0.554s31.02x
💻 LocalNitro27.532s (~)28.052s (~)0.519s31.03x
🌐 MongoDBNext.js (Turbopack)30.454s31.026s0.571s21.13x
🐘 PostgresNext.js (Turbopack)37.396s38.085s0.689s21.39x
🐘 PostgresExpress50.339s (~)51.127s (+1.0%)0.788s21.87x
🐘 PostgresNitro50.541s (~)51.128s (~)0.588s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)51.638s (+13.8% 🔺)52.494s (+13.6% 🔺)0.856s21.00x
▲ VercelExpress53.536s (+19.5% 🔺)54.278s (+17.8% 🔺)0.742s21.04x
▲ VercelNitro55.613s (+26.3% 🔺)56.634s (+24.7% 🔺)1.021s21.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.454s55.097s0.643s21.00x
💻 LocalNext.js (Turbopack)56.008s56.107s0.099s21.03x
💻 LocalExpress57.304s (+2.3%)58.098s (+3.6%)0.794s21.05x
💻 LocalNitro57.494s (~)58.106s (~)0.612s21.06x
🌐 MongoDBNext.js (Turbopack)60.847s61.065s0.218s21.12x
🐘 PostgresNext.js (Turbopack)71.530s72.161s0.631s21.31x
🐘 PostgresNitro100.228s (~)100.234s (-1.0%)0.006s11.84x
🐘 PostgresExpress100.245s (~)101.244s (+1.0%)0.999s11.84x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.956s (+2.0%)92.604s (+1.0%)0.648s11.00x
▲ VercelNext.js (Turbopack)97.319s (+5.3% 🔺)99.055s (+6.1% 🔺)1.736s11.06x
▲ VercelExpress105.381s (+17.3% 🔺)106.071s (+16.4% 🔺)0.690s11.15x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.243s2.006s0.763s151.00x
💻 LocalNext.js (Turbopack)1.387s2.005s0.618s151.12x
💻 LocalExpress1.411s (+2.9%)2.006s (~)0.595s151.13x
💻 LocalNitro1.438s (+1.8%)2.006s (~)0.568s151.16x
🐘 PostgresNext.js (Turbopack)2.038s2.297s0.259s141.64x
🌐 MongoDBNext.js (Turbopack)2.137s3.007s0.870s101.72x
🐘 PostgresExpress2.294s (+2.7%)3.015s (~)0.721s101.84x
🐘 PostgresNitro2.309s (-4.4%)3.014s (~)0.705s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.812s (+9.3% 🔺)3.766s (+10.0% 🔺)0.954s81.00x
▲ VercelExpress2.869s (+11.7% 🔺)3.963s (+14.6% 🔺)1.094s81.02x
▲ VercelNext.js (Turbopack)3.053s (-0.7%)3.991s (-3.9%)0.938s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.404s3.007s0.603s101.00x
🌐 RedisNext.js (Turbopack)2.475s3.007s0.532s101.03x
💻 LocalExpress2.592s (+10.4% 🔺)3.007s (~)0.416s101.08x
💻 LocalNitro2.694s (+2.9%)3.008s (~)0.314s101.12x
🌐 MongoDBNext.js (Turbopack)4.678s5.176s0.498s61.95x
🐘 PostgresExpress8.735s (-0.5%)9.032s (-2.8%)0.297s43.63x
🐘 PostgresNitro9.251s (-3.1%)9.787s (-2.5%)0.537s43.85x
🐘 PostgresNext.js (Turbopack)10.773s11.036s0.263s34.48x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.707s (-33.0% 🟢)3.539s (-33.9% 🟢)0.832s91.00x
▲ VercelNext.js (Turbopack)2.980s (+8.6% 🔺)3.991s (+9.8% 🔺)1.010s81.10x
▲ VercelExpress3.179s (+8.9% 🔺)4.159s (+6.4% 🔺)0.981s81.17x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.080s4.867s0.786s71.00x
💻 LocalNext.js (Turbopack)6.763s7.215s0.452s51.66x
💻 LocalExpress7.457s (+15.1% 🔺)8.016s (+14.3% 🔺)0.559s41.83x
💻 LocalNitro7.814s (+5.0% 🔺)8.271s (+3.1%)0.456s41.92x
🌐 MongoDBNext.js (Turbopack)9.892s10.346s0.454s32.42x
🐘 PostgresNitro47.939s (+4.4%)48.145s (+4.4%)0.206s111.75x
🐘 PostgresExpress49.134s (+4.8%)50.148s (+6.4% 🔺)1.014s112.04x
🐘 PostgresNext.js (Turbopack)50.848s51.123s0.275s112.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.480s (+59.1% 🔺)7.709s (+49.5% 🔺)1.229s51.00x
▲ VercelExpress7.002s (+92.1% 🔺)8.127s (+74.4% 🔺)1.125s41.08x
▲ VercelNext.js (Turbopack)9.671s (+131.0% 🔺)10.844s (+107.7% 🔺)1.172s31.49x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.262s2.006s0.744s151.00x
💻 LocalNext.js (Turbopack)1.421s2.004s0.583s151.13x
💻 LocalNitro1.422s (+1.2%)2.005s (~)0.583s151.13x
💻 LocalExpress1.424s (+3.8%)2.005s (~)0.581s151.13x
🐘 PostgresNitro2.029s (+12.2% 🔺)2.397s (~)0.368s131.61x
🐘 PostgresExpress2.049s (-6.0% 🟢)2.924s (+6.7% 🔺)0.875s111.62x
🐘 PostgresNext.js (Turbopack)2.153s2.830s0.678s111.71x
🌐 MongoDBNext.js (Turbopack)2.172s3.008s0.836s101.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.393s (-2.3%)3.369s (-3.4%)0.977s91.00x
▲ VercelNitro2.671s (+11.6% 🔺)3.622s (+7.4% 🔺)0.951s91.12x
▲ VercelExpress3.523s (+21.1% 🔺)4.331s (+13.5% 🔺)0.807s81.47x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.457s3.007s0.551s101.00x
🌐 RedisNext.js (Turbopack)2.494s3.008s0.514s101.02x
💻 LocalExpress2.738s (+10.3% 🔺)3.007s (~)0.269s101.11x
💻 LocalNitro2.796s (+3.7%)3.009s (~)0.213s101.14x
🌐 MongoDBNext.js (Turbopack)4.673s5.176s0.503s61.90x
🐘 PostgresExpress8.599s (-30.0% 🟢)9.278s (-25.0% 🟢)0.679s43.50x
🐘 PostgresNitro10.123s (-11.0% 🟢)10.699s (-11.1% 🟢)0.577s34.12x
🐘 PostgresNext.js (Turbopack)12.685s13.369s0.684s35.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.463s (-17.8% 🟢)3.257s (-14.2% 🟢)0.794s101.00x
▲ VercelNitro2.514s (+3.1%)3.472s (+5.6% 🔺)0.957s91.02x
▲ VercelNext.js (Turbopack)3.549s (+22.9% 🔺)4.411s (+14.9% 🔺)0.863s71.44x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.108s4.868s0.760s71.00x
💻 LocalNext.js (Turbopack)7.195s7.613s0.418s51.75x
💻 LocalExpress7.955s (+9.6% 🔺)8.770s (+9.4% 🔺)0.815s41.94x
💻 LocalNitro8.409s (+5.9% 🔺)9.022s (+9.1% 🔺)0.614s42.05x
🌐 MongoDBNext.js (Turbopack)9.893s10.347s0.455s32.41x
🐘 PostgresExpress46.892s (-4.8%)47.127s (-6.0% 🟢)0.235s111.41x
🐘 PostgresNitro48.666s (-0.9%)49.118s (-2.0%)0.452s111.85x
🐘 PostgresNext.js (Turbopack)54.890s55.134s0.244s113.36x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.362s (-25.5% 🟢)6.455s (-24.5% 🟢)1.093s51.00x
▲ VercelNext.js (Turbopack)6.379s (-11.7% 🟢)7.613s (-11.1% 🟢)1.234s51.19x
▲ VercelExpress7.040s (+61.0% 🔺)8.169s (+49.1% 🔺)1.129s41.31x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.131s1.001s0.010s1.016s0.885s101.00x
🌐 RedisNext.js (Turbopack)0.144s1.000s0.001s1.007s0.863s101.10x
💻 LocalExpress0.172s (+49.6% 🔺)1.002s (~)0.011s (-1.9%)1.015s (~)0.843s101.31x
💻 LocalNitro0.177s (+2.0%)1.003s (~)0.011s (+1.9%)1.017s (~)0.840s101.35x
🌐 MongoDBNext.js (Turbopack)0.483s0.965s0.001s1.008s0.525s103.68x
🐘 PostgresNext.js (Turbopack)0.697s0.860s0.001s1.010s0.313s105.30x
🐘 PostgresNitro2.335s (-4.7%)2.709s (+4.6%)0.001s (~)3.015s (~)0.681s1017.77x
🐘 PostgresExpress2.351s (+2.6%)2.693s (-2.1%)0.001s (-7.1% 🟢)3.015s (~)0.664s1017.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.927s (-9.8% 🟢)2.645s (~)0.216s (-14.7% 🟢)3.413s (-0.9%)1.486s101.00x
▲ VercelExpress2.045s (-6.0% 🟢)2.711s (-2.9%)0.150s (-46.1% 🟢)3.455s (-6.1% 🟢)1.410s101.06x
▲ VercelNext.js (Turbopack)2.120s (-10.3% 🟢)2.769s (+4.0%)0.166s (-38.3% 🟢)3.524s (-1.9%)1.404s101.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)💻 Local6/12
Nitro💻 Local9/12
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

@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production501038539
✅ 💻 Local Development520068588
✅ 📦 Local Production520068588
✅ 🐘 Local Postgres520068588
✅ 🪟 Windows460349
❌ 🌍 Community Worlds105429156
✅ 📋 Other126021147
Total2338422752655

❌ Failed Tests

🌍 Community Worlds (42 failed)

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • 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
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4504
✅ example4504
✅ express4504
✅ fastify4504
✅ hono4504
✅ nextjs-turbopack4801
✅ nextjs-webpack4801
✅ nitro4504
✅ nuxt4504
✅ sveltekit4504
✅ vite4504
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4603
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4603
✅ redis-dev300
✅ redis4603
✅ turso-dev300
❌ turso4423
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4207
✅ e2e-local-postgres-nest-stable4207
✅ e2e-local-prod-nest-stable4207

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces manual authentication file reading with the @vercel/cli-auth package, adding automatic OAuth token refresh functionality. Previously, the CLI would read the auth token from disk without any refresh logic, causing API calls to fail when tokens expired. Now, getAuthToken() automatically checks token expiry and refreshes expired tokens using stored refresh tokens.

Changes:

  • Integrated @vercel/cli-auth package (v0.0.1) for credential management and OAuth refresh
  • Refactored authentication logic to support automatic token refresh before expiry
  • Simplified error messages by removing references to manual vercel env pull commands

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdded @vercel/cli-auth@0.0.1 and its dependencies (async-listen, open@8.4.0)
packages/cli/package.jsonAdded @vercel/cli-auth as a dependency
packages/cli/src/lib/inspect/auth.tsComplete refactor: replaced manual file reading with CredentialsStore and added OAuth token refresh logic
packages/cli/src/lib/inspect/env.tsUpdated to use async getAuthToken() instead of sync getAuth()
packages/cli/src/lib/inspect/vercel-api.tsRemoved reference to vercel env pull from error message
packages/errors/src/index.tsRemoved reference to vercel env pull from VERCEL_403_ERROR_MESSAGE
.changeset/free-carrots-repair.mdAdded changeset documenting the change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to +61
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The version is hardcoded as '0.0.0' but should use the actual CLI version. Other commands in the codebase use this.config.version from oclif to get the version dynamically. However, since this is not in a command class context, consider passing the version as a parameter to getAuthToken() or importing it from package.json. This is important for proper user-agent tracking and debugging.

Copilot uses AI. Check for mistakes.
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token expiry check uses >= which means a token is considered valid even when expiresAt equals the current time. This could lead to using an expired token. Consider using > instead to ensure the token has not yet expired, or add a small buffer (e.g., 60 seconds) to refresh tokens before they actually expire.

Suggested change
if(credentials.expiresAt>=nowInSeconds){
if(credentials.expiresAt>nowInSeconds){

Copilot uses AI. Check for mistakes.
Comment on lines +27 to 88
export async function getAuthToken(): Promise<string | null> {
let credentials: Credentials;
try {
credentials = store.get();
} catch {
return null;
}
if (!credentials?.token) {
return null;
}

import fs from 'node:fs';
import path from 'node:path';
import XDGAppPaths from 'xdg-app-paths';
import { z } from 'zod';
// If there's no expiration info, assume the token is valid
// (e.g. legacy tokens without OAuth)
if (typeof credentials.expiresAt !== 'number') {
return credentials.token;
}

// Types aren't inferred correctly. Typescript wants us to call `.default` on the imported module,
// but the actual underlying JS code exposes the code top-level, so we need to cast it here.
const getXDGAppPaths = (app: string) => {
return (
XDGAppPaths as unknown as (app: string) => { dataDirs: () => string[] }
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {
// Token is still valid
return credentials.token;
}

const vercelDirectories = getXDGAppPaths('com.vercel.cli').dataDirs();
// Token is expired — attempt refresh
if (!credentials.refreshToken) {
logger.debug('Auth token expired and no refresh token available');
return null;
}

const AuthFile = z.object({
token: z.string().min(1),
refresh_token: z.string().min(1).optional(),
expiresAt: z.number().optional(),
});
logger.debug('Auth token expired, refreshing via OAuth...');
try {
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

type AuthFile = z.infer<typeof AuthFile>;
const oauth = OAuth({
issuer: VERCEL_ISSUER,
clientId: VERCEL_CLI_CLIENT_ID,
userAgent,
});
const client = await oauth.init();
const tokenSet = await client.refreshToken(credentials.refreshToken);

// Returns whether a directory exists
const isDirectory = (path: string): boolean => {
try {
return fs.lstatSync(path).isDirectory();
} catch (_) {
// We don't care which kind of error occured, it isn't a directory anyway.
return false;
}
};
const updatedCredentials = {
...credentials,
token: tokenSet.access_token,
expiresAt: Math.floor(Date.now() / 1000) + tokenSet.expires_in,
...(tokenSet.refresh_token
? { refreshToken: tokenSet.refresh_token }
: {}),
};

// Returns in which directory the config should be present
const getGlobalPathConfig = (): string => {
// The customPath flag is the preferred location,
// followed by the vercel directory.
// (Legacy "now" directory is no longer supported)
// If none of those exist, use the vercel directory.
return (
vercelDirectories.find((configPath) => isDirectory(configPath)) ||
vercelDirectories[0]
);
};
store.update(updatedCredentials);
logger.debug('Auth token refreshed successfully');

export const getAuth = () => {
try {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
return AuthFile.parse(JSON.parse(fs.readFileSync(pathname, 'utf8')));
} catch {
return tokenSet.access_token;
} catch (error) {
logger.debug('Failed to refresh auth token:', error);
return null;
}
};

export async function updateAuthConfig(
config: Partial<AuthFile>
): Promise<void> {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
fs.mkdirSync(path.dirname(pathname), { recursive: true });
fs.writeFileSync(pathname, JSON.stringify(config, null, 2) + '\n');
}

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token refresh logic lacks protection against concurrent refresh attempts. If getAuthToken() is called multiple times simultaneously while a token is expired, multiple refresh requests could be initiated in parallel, potentially causing race conditions. Consider implementing a mutex or promise caching mechanism to ensure only one refresh happens at a time.

Copilot uses AI. Check for mistakes.
let credentials: Credentials;
try {
credentials = store.get();
} catch {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The error when reading credentials is caught and silently ignored. While this may be intentional for cases where credentials don't exist, it also silently hides other errors like permission issues or corrupted files. Consider logging these errors at debug level to aid troubleshooting, similar to how refresh errors are logged at line 85.

Suggested change
}catch{
}catch(error){
logger.debug('Failed to read auth credentials from store:',error);

Copilot uses AI. Check for mistakes.
"@workflow/builders": "workspace:*",
"@workflow/swc-plugin": "workspace:*",
"@workflow/utils": "workspace:*",
"@vercel/cli-auth": "0.0.1",

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The @vercel/cli-auth package is at version 0.0.1, which indicates it's in very early development. Using such an early version in production could be risky as the API may be unstable and subject to breaking changes. Consider verifying that this is the intended version and that it's stable enough for production use.

Suggested change
"@vercel/cli-auth": "0.0.1",
"@vercel/cli-auth": "^1.0.0",

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate enabled auto-merge (squash) February 13, 2026 21:25
@TooTallNate
TooTallNate merged commit 8cfb438 into mainFeb 13, 2026
160 of 171 checks passed
@TooTallNate
TooTallNate deleted the 02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh branch February 13, 2026 21:46
Sign up for freeto 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.

4 participants

@TooTallNate@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Use @vercel/cli-auth for auth token reading and OAuth refresh - #1043

Merged
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh
Feb 13, 2026
Merged

Use @vercel/cli-auth for auth token reading and OAuth refresh#1043
TooTallNate merged 2 commits into
mainfrom
02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Replace the manual auth.json reading logic in the CLI with the @vercel/cli-auth package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.

Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.

Replace the manual auth.json reading logic in the CLI with the `@vercel/cli-auth` package, which handles credential storage via CredentialsStore and OAuth token refresh via the OAuth client.
Previously, the CLI would read the token from disk but had no refresh logic — if the token was expired, API calls would fail.
Now, getAuthToken() checks token expiry and automatically refreshes it using the stored refresh token before returning it.
@changeset-bot

changeset-botBot commented Feb 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8dbf9a9

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

This PR includes changesets to release 14 packages
NameType
@workflow/cliPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

@TooTallNate
TooTallNate marked this pull request as ready for review February 13, 2026 19:19
CopilotAI review requested due to automatic review settings February 13, 2026 19:19
@vercel

vercelBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

@TooTallNate
TooTallNate requested review from a team and removed request for CopilotFebruary 13, 2026 19:20
@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.032s (+14.9% 🔺)1.005s (~)0.974s101.00x
💻 LocalNitro0.033s (+2.2%)1.005s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.035s1.005s0.970s101.11x
🌐 RedisNext.js (Turbopack)0.043s1.005s0.961s101.37x
🌐 MongoDBNext.js (Turbopack)0.074s1.007s0.932s102.34x
🐘 PostgresExpress0.137s (+49.3% 🔺)1.011s (~)0.874s104.31x
🐘 PostgresNitro0.340s (+61.4% 🔺)1.012s (~)0.672s1010.73x
🐘 PostgresNext.js (Turbopack)0.436s1.009s0.573s1013.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.564s (-24.9% 🟢)2.009s (-1.4%)1.444s101.00x
▲ VercelNext.js (Turbopack)0.600s (-13.1% 🟢)2.053s (-4.1%)1.453s101.06x
▲ VercelNitro0.612s (+2.0%)2.052s (+2.9%)1.440s101.08x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.086s2.005s0.919s101.00x
💻 LocalExpress1.105s (+2.4%)2.006s (~)0.901s101.02x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.02x
🌐 RedisNext.js (Turbopack)1.109s2.006s0.897s101.02x
🌐 MongoDBNext.js (Turbopack)1.296s2.006s0.710s101.19x
🐘 PostgresNext.js (Turbopack)1.815s2.012s0.197s101.67x
🐘 PostgresNitro2.391s (-1.9%)3.014s (~)0.624s102.20x
🐘 PostgresExpress2.460s (~)3.014s (~)0.554s102.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.377s (-1.1%)3.225s (+2.5%)0.848s101.00x
▲ VercelNext.js (Turbopack)2.484s (-4.4%)3.426s (~)0.942s101.04x
▲ VercelNitro3.138s (+26.6% 🔺)4.160s (+19.3% 🔺)1.022s101.32x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.645s11.021s0.376s31.00x
🌐 RedisNext.js (Turbopack)10.722s11.022s0.300s31.01x
💻 LocalNitro10.831s (~)11.022s (~)0.191s31.02x
💻 LocalExpress10.832s (+2.3%)11.023s (~)0.191s31.02x
🌐 MongoDBNext.js (Turbopack)12.197s13.013s0.816s31.15x
🐘 PostgresNext.js (Turbopack)14.800s15.041s0.241s21.39x
🐘 PostgresNitro20.247s (~)21.059s (~)0.812s21.90x
🐘 PostgresExpress20.317s (~)21.059s (~)0.742s21.91x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.813s (-3.0%)19.224s (-1.9%)1.411s21.00x
▲ VercelExpress18.124s (-1.3%)19.409s (-1.9%)1.285s21.02x
▲ VercelNext.js (Turbopack)22.613s (+19.3% 🔺)24.038s (+18.8% 🔺)1.425s21.27x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.857s27.050s0.193s31.00x
💻 LocalNext.js (Turbopack)26.923s27.053s0.130s31.00x
💻 LocalExpress27.497s (+2.3%)28.051s (+3.7%)0.554s31.02x
💻 LocalNitro27.532s (~)28.052s (~)0.519s31.03x
🌐 MongoDBNext.js (Turbopack)30.454s31.026s0.571s21.13x
🐘 PostgresNext.js (Turbopack)37.396s38.085s0.689s21.39x
🐘 PostgresExpress50.339s (~)51.127s (+1.0%)0.788s21.87x
🐘 PostgresNitro50.541s (~)51.128s (~)0.588s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)51.638s (+13.8% 🔺)52.494s (+13.6% 🔺)0.856s21.00x
▲ VercelExpress53.536s (+19.5% 🔺)54.278s (+17.8% 🔺)0.742s21.04x
▲ VercelNitro55.613s (+26.3% 🔺)56.634s (+24.7% 🔺)1.021s21.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.454s55.097s0.643s21.00x
💻 LocalNext.js (Turbopack)56.008s56.107s0.099s21.03x
💻 LocalExpress57.304s (+2.3%)58.098s (+3.6%)0.794s21.05x
💻 LocalNitro57.494s (~)58.106s (~)0.612s21.06x
🌐 MongoDBNext.js (Turbopack)60.847s61.065s0.218s21.12x
🐘 PostgresNext.js (Turbopack)71.530s72.161s0.631s21.31x
🐘 PostgresNitro100.228s (~)100.234s (-1.0%)0.006s11.84x
🐘 PostgresExpress100.245s (~)101.244s (+1.0%)0.999s11.84x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.956s (+2.0%)92.604s (+1.0%)0.648s11.00x
▲ VercelNext.js (Turbopack)97.319s (+5.3% 🔺)99.055s (+6.1% 🔺)1.736s11.06x
▲ VercelExpress105.381s (+17.3% 🔺)106.071s (+16.4% 🔺)0.690s11.15x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.243s2.006s0.763s151.00x
💻 LocalNext.js (Turbopack)1.387s2.005s0.618s151.12x
💻 LocalExpress1.411s (+2.9%)2.006s (~)0.595s151.13x
💻 LocalNitro1.438s (+1.8%)2.006s (~)0.568s151.16x
🐘 PostgresNext.js (Turbopack)2.038s2.297s0.259s141.64x
🌐 MongoDBNext.js (Turbopack)2.137s3.007s0.870s101.72x
🐘 PostgresExpress2.294s (+2.7%)3.015s (~)0.721s101.84x
🐘 PostgresNitro2.309s (-4.4%)3.014s (~)0.705s101.86x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.812s (+9.3% 🔺)3.766s (+10.0% 🔺)0.954s81.00x
▲ VercelExpress2.869s (+11.7% 🔺)3.963s (+14.6% 🔺)1.094s81.02x
▲ VercelNext.js (Turbopack)3.053s (-0.7%)3.991s (-3.9%)0.938s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.404s3.007s0.603s101.00x
🌐 RedisNext.js (Turbopack)2.475s3.007s0.532s101.03x
💻 LocalExpress2.592s (+10.4% 🔺)3.007s (~)0.416s101.08x
💻 LocalNitro2.694s (+2.9%)3.008s (~)0.314s101.12x
🌐 MongoDBNext.js (Turbopack)4.678s5.176s0.498s61.95x
🐘 PostgresExpress8.735s (-0.5%)9.032s (-2.8%)0.297s43.63x
🐘 PostgresNitro9.251s (-3.1%)9.787s (-2.5%)0.537s43.85x
🐘 PostgresNext.js (Turbopack)10.773s11.036s0.263s34.48x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.707s (-33.0% 🟢)3.539s (-33.9% 🟢)0.832s91.00x
▲ VercelNext.js (Turbopack)2.980s (+8.6% 🔺)3.991s (+9.8% 🔺)1.010s81.10x
▲ VercelExpress3.179s (+8.9% 🔺)4.159s (+6.4% 🔺)0.981s81.17x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.080s4.867s0.786s71.00x
💻 LocalNext.js (Turbopack)6.763s7.215s0.452s51.66x
💻 LocalExpress7.457s (+15.1% 🔺)8.016s (+14.3% 🔺)0.559s41.83x
💻 LocalNitro7.814s (+5.0% 🔺)8.271s (+3.1%)0.456s41.92x
🌐 MongoDBNext.js (Turbopack)9.892s10.346s0.454s32.42x
🐘 PostgresNitro47.939s (+4.4%)48.145s (+4.4%)0.206s111.75x
🐘 PostgresExpress49.134s (+4.8%)50.148s (+6.4% 🔺)1.014s112.04x
🐘 PostgresNext.js (Turbopack)50.848s51.123s0.275s112.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.480s (+59.1% 🔺)7.709s (+49.5% 🔺)1.229s51.00x
▲ VercelExpress7.002s (+92.1% 🔺)8.127s (+74.4% 🔺)1.125s41.08x
▲ VercelNext.js (Turbopack)9.671s (+131.0% 🔺)10.844s (+107.7% 🔺)1.172s31.49x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.262s2.006s0.744s151.00x
💻 LocalNext.js (Turbopack)1.421s2.004s0.583s151.13x
💻 LocalNitro1.422s (+1.2%)2.005s (~)0.583s151.13x
💻 LocalExpress1.424s (+3.8%)2.005s (~)0.581s151.13x
🐘 PostgresNitro2.029s (+12.2% 🔺)2.397s (~)0.368s131.61x
🐘 PostgresExpress2.049s (-6.0% 🟢)2.924s (+6.7% 🔺)0.875s111.62x
🐘 PostgresNext.js (Turbopack)2.153s2.830s0.678s111.71x
🌐 MongoDBNext.js (Turbopack)2.172s3.008s0.836s101.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.393s (-2.3%)3.369s (-3.4%)0.977s91.00x
▲ VercelNitro2.671s (+11.6% 🔺)3.622s (+7.4% 🔺)0.951s91.12x
▲ VercelExpress3.523s (+21.1% 🔺)4.331s (+13.5% 🔺)0.807s81.47x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.457s3.007s0.551s101.00x
🌐 RedisNext.js (Turbopack)2.494s3.008s0.514s101.02x
💻 LocalExpress2.738s (+10.3% 🔺)3.007s (~)0.269s101.11x
💻 LocalNitro2.796s (+3.7%)3.009s (~)0.213s101.14x
🌐 MongoDBNext.js (Turbopack)4.673s5.176s0.503s61.90x
🐘 PostgresExpress8.599s (-30.0% 🟢)9.278s (-25.0% 🟢)0.679s43.50x
🐘 PostgresNitro10.123s (-11.0% 🟢)10.699s (-11.1% 🟢)0.577s34.12x
🐘 PostgresNext.js (Turbopack)12.685s13.369s0.684s35.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.463s (-17.8% 🟢)3.257s (-14.2% 🟢)0.794s101.00x
▲ VercelNitro2.514s (+3.1%)3.472s (+5.6% 🔺)0.957s91.02x
▲ VercelNext.js (Turbopack)3.549s (+22.9% 🔺)4.411s (+14.9% 🔺)0.863s71.44x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.108s4.868s0.760s71.00x
💻 LocalNext.js (Turbopack)7.195s7.613s0.418s51.75x
💻 LocalExpress7.955s (+9.6% 🔺)8.770s (+9.4% 🔺)0.815s41.94x
💻 LocalNitro8.409s (+5.9% 🔺)9.022s (+9.1% 🔺)0.614s42.05x
🌐 MongoDBNext.js (Turbopack)9.893s10.347s0.455s32.41x
🐘 PostgresExpress46.892s (-4.8%)47.127s (-6.0% 🟢)0.235s111.41x
🐘 PostgresNitro48.666s (-0.9%)49.118s (-2.0%)0.452s111.85x
🐘 PostgresNext.js (Turbopack)54.890s55.134s0.244s113.36x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.362s (-25.5% 🟢)6.455s (-24.5% 🟢)1.093s51.00x
▲ VercelNext.js (Turbopack)6.379s (-11.7% 🟢)7.613s (-11.1% 🟢)1.234s51.19x
▲ VercelExpress7.040s (+61.0% 🔺)8.169s (+49.1% 🔺)1.129s41.31x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.131s1.001s0.010s1.016s0.885s101.00x
🌐 RedisNext.js (Turbopack)0.144s1.000s0.001s1.007s0.863s101.10x
💻 LocalExpress0.172s (+49.6% 🔺)1.002s (~)0.011s (-1.9%)1.015s (~)0.843s101.31x
💻 LocalNitro0.177s (+2.0%)1.003s (~)0.011s (+1.9%)1.017s (~)0.840s101.35x
🌐 MongoDBNext.js (Turbopack)0.483s0.965s0.001s1.008s0.525s103.68x
🐘 PostgresNext.js (Turbopack)0.697s0.860s0.001s1.010s0.313s105.30x
🐘 PostgresNitro2.335s (-4.7%)2.709s (+4.6%)0.001s (~)3.015s (~)0.681s1017.77x
🐘 PostgresExpress2.351s (+2.6%)2.693s (-2.1%)0.001s (-7.1% 🟢)3.015s (~)0.664s1017.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.927s (-9.8% 🟢)2.645s (~)0.216s (-14.7% 🟢)3.413s (-0.9%)1.486s101.00x
▲ VercelExpress2.045s (-6.0% 🟢)2.711s (-2.9%)0.150s (-46.1% 🟢)3.455s (-6.1% 🟢)1.410s101.06x
▲ VercelNext.js (Turbopack)2.120s (-10.3% 🟢)2.769s (+4.0%)0.166s (-38.3% 🟢)3.524s (-1.9%)1.404s101.10x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)💻 Local6/12
Nitro💻 Local9/12
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

@github-actions

github-actionsBot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production501038539
✅ 💻 Local Development520068588
✅ 📦 Local Production520068588
✅ 🐘 Local Postgres520068588
✅ 🪟 Windows460349
❌ 🌍 Community Worlds105429156
✅ 📋 Other126021147
Total2338422752655

❌ Failed Tests

🌍 Community Worlds (42 failed)

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • 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
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4504
✅ example4504
✅ express4504
✅ fastify4504
✅ hono4504
✅ nextjs-turbopack4801
✅ nextjs-webpack4801
✅ nitro4504
✅ nuxt4504
✅ sveltekit4504
✅ vite4504
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4207
✅ express-stable4207
✅ fastify-stable4207
✅ hono-stable4207
✅ nextjs-turbopack-canary4603
✅ nextjs-turbopack-stable4603
✅ nextjs-webpack-canary4603
✅ nextjs-webpack-stable4603
✅ nitro-stable4207
✅ nuxt-stable4207
✅ sveltekit-stable4207
✅ vite-stable4207
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4603
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4603
✅ redis-dev300
✅ redis4603
✅ turso-dev300
❌ turso4423
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4207
✅ e2e-local-postgres-nest-stable4207
✅ e2e-local-prod-nest-stable4207

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces manual authentication file reading with the @vercel/cli-auth package, adding automatic OAuth token refresh functionality. Previously, the CLI would read the auth token from disk without any refresh logic, causing API calls to fail when tokens expired. Now, getAuthToken() automatically checks token expiry and refreshes expired tokens using stored refresh tokens.

Changes:

  • Integrated @vercel/cli-auth package (v0.0.1) for credential management and OAuth refresh
  • Refactored authentication logic to support automatic token refresh before expiry
  • Simplified error messages by removing references to manual vercel env pull commands

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdded @vercel/cli-auth@0.0.1 and its dependencies (async-listen, open@8.4.0)
packages/cli/package.jsonAdded @vercel/cli-auth as a dependency
packages/cli/src/lib/inspect/auth.tsComplete refactor: replaced manual file reading with CredentialsStore and added OAuth token refresh logic
packages/cli/src/lib/inspect/env.tsUpdated to use async getAuthToken() instead of sync getAuth()
packages/cli/src/lib/inspect/vercel-api.tsRemoved reference to vercel env pull from error message
packages/errors/src/index.tsRemoved reference to vercel env pull from VERCEL_403_ERROR_MESSAGE
.changeset/free-carrots-repair.mdAdded changeset documenting the change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to +61
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The version is hardcoded as '0.0.0' but should use the actual CLI version. Other commands in the codebase use this.config.version from oclif to get the version dynamically. However, since this is not in a command class context, consider passing the version as a parameter to getAuthToken() or importing it from package.json. This is important for proper user-agent tracking and debugging.

Copilot uses AI. Check for mistakes.
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token expiry check uses >= which means a token is considered valid even when expiresAt equals the current time. This could lead to using an expired token. Consider using > instead to ensure the token has not yet expired, or add a small buffer (e.g., 60 seconds) to refresh tokens before they actually expire.

Suggested change
if(credentials.expiresAt>=nowInSeconds){
if(credentials.expiresAt>nowInSeconds){

Copilot uses AI. Check for mistakes.
Comment on lines +27 to 88
export async function getAuthToken(): Promise<string | null> {
let credentials: Credentials;
try {
credentials = store.get();
} catch {
return null;
}
if (!credentials?.token) {
return null;
}

import fs from 'node:fs';
import path from 'node:path';
import XDGAppPaths from 'xdg-app-paths';
import { z } from 'zod';
// If there's no expiration info, assume the token is valid
// (e.g. legacy tokens without OAuth)
if (typeof credentials.expiresAt !== 'number') {
return credentials.token;
}

// Types aren't inferred correctly. Typescript wants us to call `.default` on the imported module,
// but the actual underlying JS code exposes the code top-level, so we need to cast it here.
const getXDGAppPaths = (app: string) => {
return (
XDGAppPaths as unknown as (app: string) => { dataDirs: () => string[] }
)(app);
};
const nowInSeconds = Math.floor(Date.now() / 1000);
if (credentials.expiresAt >= nowInSeconds) {
// Token is still valid
return credentials.token;
}

const vercelDirectories = getXDGAppPaths('com.vercel.cli').dataDirs();
// Token is expired — attempt refresh
if (!credentials.refreshToken) {
logger.debug('Auth token expired and no refresh token available');
return null;
}

const AuthFile = z.object({
token: z.string().min(1),
refresh_token: z.string().min(1).optional(),
expiresAt: z.number().optional(),
});
logger.debug('Auth token expired, refreshing via OAuth...');
try {
const userAgent = getUserAgent({
name: '@workflow/cli',
version: '0.0.0',
});

type AuthFile = z.infer<typeof AuthFile>;
const oauth = OAuth({
issuer: VERCEL_ISSUER,
clientId: VERCEL_CLI_CLIENT_ID,
userAgent,
});
const client = await oauth.init();
const tokenSet = await client.refreshToken(credentials.refreshToken);

// Returns whether a directory exists
const isDirectory = (path: string): boolean => {
try {
return fs.lstatSync(path).isDirectory();
} catch (_) {
// We don't care which kind of error occured, it isn't a directory anyway.
return false;
}
};
const updatedCredentials = {
...credentials,
token: tokenSet.access_token,
expiresAt: Math.floor(Date.now() / 1000) + tokenSet.expires_in,
...(tokenSet.refresh_token
? { refreshToken: tokenSet.refresh_token }
: {}),
};

// Returns in which directory the config should be present
const getGlobalPathConfig = (): string => {
// The customPath flag is the preferred location,
// followed by the vercel directory.
// (Legacy "now" directory is no longer supported)
// If none of those exist, use the vercel directory.
return (
vercelDirectories.find((configPath) => isDirectory(configPath)) ||
vercelDirectories[0]
);
};
store.update(updatedCredentials);
logger.debug('Auth token refreshed successfully');

export const getAuth = () => {
try {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
return AuthFile.parse(JSON.parse(fs.readFileSync(pathname, 'utf8')));
} catch {
return tokenSet.access_token;
} catch (error) {
logger.debug('Failed to refresh auth token:', error);
return null;
}
};

export async function updateAuthConfig(
config: Partial<AuthFile>
): Promise<void> {
const pathname = path.join(getGlobalPathConfig(), 'auth.json');
fs.mkdirSync(path.dirname(pathname), { recursive: true });
fs.writeFileSync(pathname, JSON.stringify(config, null, 2) + '\n');
}

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The token refresh logic lacks protection against concurrent refresh attempts. If getAuthToken() is called multiple times simultaneously while a token is expired, multiple refresh requests could be initiated in parallel, potentially causing race conditions. Consider implementing a mutex or promise caching mechanism to ensure only one refresh happens at a time.

Copilot uses AI. Check for mistakes.
let credentials: Credentials;
try {
credentials = store.get();
} catch {

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The error when reading credentials is caught and silently ignored. While this may be intentional for cases where credentials don't exist, it also silently hides other errors like permission issues or corrupted files. Consider logging these errors at debug level to aid troubleshooting, similar to how refresh errors are logged at line 85.

Suggested change
}catch{
}catch(error){
logger.debug('Failed to read auth credentials from store:',error);

Copilot uses AI. Check for mistakes.
"@workflow/builders": "workspace:*",
"@workflow/swc-plugin": "workspace:*",
"@workflow/utils": "workspace:*",
"@vercel/cli-auth": "0.0.1",

CopilotAIFeb 13, 2026

Copy link

Choose a reason for hiding this comment

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

The @vercel/cli-auth package is at version 0.0.1, which indicates it's in very early development. Using such an early version in production could be risky as the API may be unstable and subject to breaking changes. Consider verifying that this is the intended version and that it's stable enough for production use.

Suggested change
"@vercel/cli-auth": "0.0.1",
"@vercel/cli-auth": "^1.0.0",

Copilot uses AI. Check for mistakes.
@TooTallNate
TooTallNate enabled auto-merge (squash) February 13, 2026 21:25
@TooTallNate
TooTallNate merged commit 8cfb438 into mainFeb 13, 2026
160 of 171 checks passed
@TooTallNate
TooTallNate deleted the 02-13-use_vercel_cli-auth_for_auth_token_reading_and_oauth_refresh branch February 13, 2026 21:46
Sign up for freeto 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.

4 participants

@TooTallNate@ijjk@VaguelySerious