fix: use workflow health endpoint to check for port - #616

Merged
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint
Dec 16, 2025
Merged

fix: use workflow health endpoint to check for port#616
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint

Conversation

@adriandlam

Copy link
Copy Markdown
Contributor

instead of pinging the flow workflow endpoint to check for port and looking for non-404s, we ping the health check endpoint for workflow at http://localhost:${PORT}/.well-known/workflow/v1/flow?__health for 200

@changeset-bot

changeset-botBot commented Dec 15, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa8510e

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

This PR includes changesets to release 17 packages
NameType
@workflow/utilsPatch
@workflow/corePatch
@workflow/errorsPatch
@workflow/world-localPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch

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

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

@vercel

vercelBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 15, 2025

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
🌐 Starter🥇 Next.js (Turbopack)0.038s (-0.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.038s (-5.0%)1.017s (~)0.978s101.01x
🌐 RedisNext.js (Turbopack)0.040s (-3.4%)1.016s (~)0.976s101.05x
💻 LocalNitro0.043s (-0.7%)1.006s (~)0.963s101.14x
💻 LocalExpress0.048s (+9.7% 🔺)1.008s (~)0.960s101.25x
🌐 TursoNext.js (Turbopack)0.109s (+43.5% 🔺)1.013s (~)0.904s102.87x
🌐 MongoDBNext.js (Turbopack)0.128s (+144.6% 🔺)1.014s (~)0.887s103.36x
🐘 PostgresNext.js (Turbopack)0.232s (+78.0% 🔺)1.022s (~)0.790s106.11x
🐘 PostgresNitro0.323s (+50.0% 🔺)1.022s (-1.1%)0.698s108.51x
🐘 PostgresExpress0.355s (+3.4%)1.013s (~)0.658s109.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.561s (-6.6% 🟢)1.462s (-12.4% 🟢)0.901s101.00x
▲ VercelNitro0.563s (-9.9% 🟢)1.692s (+0.6%)1.129s101.00x
▲ VercelExpress0.661s (-17.0% 🟢)1.640s (-7.9% 🟢)0.979s101.18x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.084s (-0.7%)2.011s (~)0.927s101.00x
💻 LocalNext.js (Turbopack)1.096s (~)2.011s (~)0.916s101.01x
🌐 RedisNext.js (Turbopack)1.100s (~)2.012s (~)0.912s101.02x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.03x
💻 LocalExpress1.117s (+0.7%)2.007s (~)0.890s101.03x
🌐 TursoNext.js (Turbopack)1.276s (~)2.013s (~)0.737s101.18x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.012s (~)0.705s101.21x
🐘 PostgresNext.js (Turbopack)1.871s (-3.0%)2.017s (-4.8%)0.146s101.73x
🐘 PostgresNitro2.098s (-14.5% 🟢)3.012s (~)0.913s101.94x
🐘 PostgresExpress2.202s (+0.6%)3.015s (~)0.813s102.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.615s (-3.3%)3.706s (+3.4%)1.091s101.00x
▲ VercelNext.js (Turbopack)2.823s (+1.9%)3.697s (-0.8%)0.874s101.08x
▲ VercelNitro2.868s (+9.3% 🔺)3.730s (+1.4%)0.862s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.570s (~)11.011s (~)0.441s51.00x
💻 LocalNext.js (Turbopack)10.638s (~)11.015s (~)0.377s51.01x
🌐 RedisNext.js (Turbopack)10.665s (~)11.013s (~)0.349s51.01x
💻 LocalNitro10.784s (~)11.012s (~)0.228s51.02x
💻 LocalExpress10.826s (~)11.014s (~)0.188s51.02x
🌐 TursoNext.js (Turbopack)12.187s (~)13.023s (~)0.836s51.15x
🌐 MongoDBNext.js (Turbopack)12.258s (~)13.024s (~)0.766s51.16x
🐘 PostgresNext.js (Turbopack)15.184s (~)16.036s (~)0.853s51.44x
🐘 PostgresExpress20.415s (~)21.035s (~)0.620s51.93x
🐘 PostgresNitro20.474s (+0.7%)21.029s (~)0.555s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)22.213s (+4.2%)22.975s (+3.8%)0.762s51.00x
▲ VercelExpress22.298s (+5.1% 🔺)23.243s (+4.9%)0.946s51.00x
▲ VercelNitro22.365s (+4.2%)22.984s (+2.3%)0.619s51.01x

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

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.336s (-1.0%)2.009s (~)0.674s51.00x
💻 LocalNext.js (Turbopack)1.344s (-1.3%)2.010s (~)0.666s51.01x
🌐 StarterNext.js (Turbopack)1.348s (-1.1%)2.009s (~)0.662s51.01x
💻 LocalNitro1.396s (-1.0%)2.006s (~)0.610s51.04x
💻 LocalExpress1.397s (~)2.007s (~)0.611s51.05x
🐘 PostgresNext.js (Turbopack)1.916s (-13.9% 🟢)2.420s (-19.8% 🟢)0.504s51.43x
🌐 MongoDBNext.js (Turbopack)2.119s (~)3.016s (~)0.897s51.59x
🌐 TursoNext.js (Turbopack)2.188s (-1.1%)3.012s (~)0.823s51.64x
🐘 PostgresNitro2.588s (+6.5% 🔺)3.013s (~)0.425s51.94x
🐘 PostgresExpress2.614s (~)3.011s (~)0.397s51.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.089s (+2.9%)4.611s (-1.5%)0.521s51.00x
▲ VercelExpress4.137s (+3.3%)5.030s (+5.6% 🔺)0.893s51.01x
▲ VercelNitro4.245s (+4.3%)5.018s (+1.1%)0.773s51.04x

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

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.674s (+4.1%)7.059s (+4.3%)0.386s51.00x
🌐 RedisNext.js (Turbopack)8.127s (+1.5%)8.335s (-1.3%)0.208s41.22x
🐘 PostgresNext.js (Turbopack)8.922s (-1.4%)9.136s (-1.4%)0.213s41.34x
🐘 PostgresNitro9.014s (+2.2%)9.468s (+4.1%)0.454s41.35x
🐘 PostgresExpress9.107s (~)9.320s (-2.0%)0.212s41.36x
💻 LocalNitro13.492s (-9.4% 🟢)13.637s (-9.1% 🟢)0.145s32.02x
💻 LocalExpress14.003s (+6.2% 🔺)14.303s (+7.3% 🔺)0.300s32.10x
💻 LocalNext.js (Turbopack)14.182s (+2.3%)14.307s (+1.9%)0.125s32.13x
🌐 TursoNext.js (Turbopack)19.983s (~)20.531s (~)0.548s22.99x
🌐 MongoDBNext.js (Turbopack)20.202s (~)20.552s (~)0.350s23.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.339s (+6.6% 🔺)18.002s (+6.7% 🔺)0.663s21.00x
▲ VercelNitro18.321s (+15.8% 🔺)19.158s (+16.8% 🔺)0.837s21.06x
▲ VercelNext.js (Turbopack)18.931s (+19.1% 🔺)19.529s (+20.2% 🔺)0.598s21.09x

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

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.744s (+0.9%)7.020s (+1.4%)0.276s51.00x
🌐 RedisNext.js (Turbopack)8.447s (-2.9%)8.980s (+1.0%)0.533s41.25x
🐘 PostgresExpress9.244s (-8.4% 🟢)9.566s (-6.4% 🟢)0.322s41.37x
🐘 PostgresNitro9.788s (+7.0% 🔺)9.985s (+4.1%)0.197s41.45x
🐘 PostgresNext.js (Turbopack)9.833s (+8.1% 🔺)10.223s (+7.6% 🔺)0.391s31.46x
💻 LocalNitro14.211s (-6.8% 🟢)14.403s (-10.0% 🟢)0.192s32.11x
💻 LocalNext.js (Turbopack)15.074s (+1.1%)15.485s (+3.0%)0.411s22.24x
💻 LocalExpress15.466s (+0.7%)16.030s (+3.5%)0.564s22.29x
🌐 MongoDBNext.js (Turbopack)19.803s (-0.6%)20.025s (-2.5%)0.222s22.94x
🌐 TursoNext.js (Turbopack)20.037s (-1.4%)20.555s (~)0.518s22.97x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.127s (-5.3% 🟢)16.549s (-7.1% 🟢)0.422s21.00x
▲ VercelExpress16.578s (-12.5% 🟢)17.443s (-11.4% 🟢)0.866s21.03x
▲ VercelNext.js (Turbopack)39.338s (+146.2% 🔺)39.640s (+138.2% 🔺)0.302s12.44x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.124s (-1.9%)1.005s (~)0.000s (NaN%)1.010s (~)0.887s101.00x
💻 LocalNext.js (Turbopack)0.131s (-3.9%)1.003s (~)0.015s (-3.8%)1.025s (~)0.894s101.06x
🌐 RedisNext.js (Turbopack)0.142s (~)1.005s (~)0.000s (NaN%)1.014s (~)0.872s101.15x
💻 LocalNitro0.173s (-3.3%)0.992s (~)0.013s (-12.0% 🟢)1.019s (~)0.846s101.40x
💻 LocalExpress0.180s (-1.4%)0.991s (~)0.016s (+17.4% 🔺)1.023s (~)0.843s101.46x
🌐 TursoNext.js (Turbopack)0.500s (-2.2%)0.952s (+1.1%)0.000s (-100.0% 🟢)1.013s (~)0.512s104.04x
🌐 MongoDBNext.js (Turbopack)0.521s (+1.6%)0.928s (-1.2%)0.000s (-100.0% 🟢)1.012s (~)0.491s104.21x
🐘 PostgresNext.js (Turbopack)0.893s (+36.5% 🔺)0.999s (+9.4% 🔺)0.000s (-70.0% 🟢)1.216s (+19.8% 🔺)0.323s107.21x
🐘 PostgresNitro1.470s (-33.9% 🟢)2.018s (-28.5% 🟢)0.000s (NaN%)2.213s (-26.6% 🟢)0.743s1011.87x
🐘 PostgresExpress2.260s (+5.1% 🔺)2.785s (+3.0%)0.000s (NaN%)3.015s (+3.4%)0.755s1018.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.759s (+4.2%)3.223s (-0.7%)0.384s (+0.7%)4.020s (-0.9%)1.261s101.00x
▲ VercelExpress2.867s (+12.2% 🔺)3.212s (+1.2%)1.059s (+508.0% 🔺)4.777s (+26.7% 🔺)1.910s101.04x
▲ VercelNitro3.056s (+13.1% 🔺)3.528s (+8.2% 🔺)0.471s (+53.4% 🔺)4.494s (+11.7% 🔺)1.438s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNext.js (Turbopack)4/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter6/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@vercelvercelBot 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.

Additional Suggestion:

The JSDoc comment for the probePort function is outdated and doesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.

View Details
📝 Patch Details
diff --git a/packages/utils/src/get-port.ts b/packages/utils/src/get-port.ts
index d4c4a28..24dca4a 100644
--- a/packages/utils/src/get-port.ts+++ b/packages/utils/src/get-port.ts@@ -248,7 +248,7 @@ export interface ProbeOptions {
* Probes a port to check if it's serving the workflow HTTP server.
* Uses HEAD request to minimize overhead.
*
- * @returns true if the port responds as a workflow server (non-404 response)+ * @returns true if the port responds with a 200 status from the health check endpoint
*/
async function probePort(
port: number,

Analysis

Outdated JSDoc comment in probePort() function doesn't match implementation

What fails: The JSDoc comment at line 251 of packages/utils/src/get-port.ts claims the probePort() function @returns true if the port responds as a workflow server (non-404 response), but the actual implementation at line 269 explicitly checks return response.status === 200;

How to reproduce:

  1. Read the JSDoc comment for probePort() function in packages/utils/src/get-port.ts (line 251)
  2. Read the implementation at lines 268-269
  3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200

What happened vs expected behavior:

  • The code behavior was changed in commit 34cb235 (Dec 15, 2025) from checking response.status !== 404 to checking response.status === 200
  • The internal code comments were updated in commit 5840ab2, but the JSDoc was left outdated
  • Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200

Fix: Updated the JSDoc @returns line to accurately reflect the implementation: @returns true if the port responds with a 200 status from the health check endpoint

Verification: All 19 tests in packages/utils/src/get-port.test.ts pass with the updated documentation.

Fix on Vercel

@adriandlamadriandlam changed the title chore: use workflow health endpoint to check for portfix: use workflow health endpoint to check for portDec 16, 2025
…oesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.
This commit fixes the issue reported at packages/utils/src/get-port.ts:251
## Outdated JSDoc comment in probePort() function doesn't match implementation
**What fails:** The JSDoc comment at line 251 of `packages/utils/src/get-port.ts` claims the `probePort()` function `@returns true if the port responds as a workflow server (non-404 response)`, but the actual implementation at line 269 explicitly checks `return response.status === 200;`
**How to reproduce:**
1. Read the JSDoc comment for `probePort()` function in `packages/utils/src/get-port.ts` (line 251)
2. Read the implementation at lines 268-269
3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200
**What happened vs expected behavior:**
- The code behavior was changed in commit `34cb235` (Dec 15, 2025) from checking `response.status !== 404` to checking `response.status === 200`
- The internal code comments were updated in commit `5840ab2`, but the JSDoc was left outdated
- Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200
**Fix:** Updated the JSDoc `@returns` line to accurately reflect the implementation: `@returns true if the port responds with a 200 status from the health check endpoint`
**Verification:** All 19 tests in `packages/utils/src/get-port.test.ts` pass with the updated documentation.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@TooTallNate

Copy link
Copy Markdown
Member

@ijjk Would this cause a problem with the lazy bundling that you're thinking of implementing?

@ijjk

ijjk commented Dec 16, 2025

Copy link
Copy Markdown
Member

This shouldn't cause a conflict with that no

@adriandlam
adriandlam merged commit 1ef6b2f into mainDec 16, 2025
89 of 90 checks passed
@adriandlam
adriandlam deleted the chore/probe-health-endpoint branch December 16, 2025 00:34
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.

3 participants

@adriandlam@TooTallNate@ijjk
, '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

fix: use workflow health endpoint to check for port - #616

Merged
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint
Dec 16, 2025
Merged

fix: use workflow health endpoint to check for port#616
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint

Conversation

@adriandlam

Copy link
Copy Markdown
Contributor

instead of pinging the flow workflow endpoint to check for port and looking for non-404s, we ping the health check endpoint for workflow at http://localhost:${PORT}/.well-known/workflow/v1/flow?__health for 200

@changeset-bot

changeset-botBot commented Dec 15, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa8510e

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

This PR includes changesets to release 17 packages
NameType
@workflow/utilsPatch
@workflow/corePatch
@workflow/errorsPatch
@workflow/world-localPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch

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

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

@vercel

vercelBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 15, 2025

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
🌐 Starter🥇 Next.js (Turbopack)0.038s (-0.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.038s (-5.0%)1.017s (~)0.978s101.01x
🌐 RedisNext.js (Turbopack)0.040s (-3.4%)1.016s (~)0.976s101.05x
💻 LocalNitro0.043s (-0.7%)1.006s (~)0.963s101.14x
💻 LocalExpress0.048s (+9.7% 🔺)1.008s (~)0.960s101.25x
🌐 TursoNext.js (Turbopack)0.109s (+43.5% 🔺)1.013s (~)0.904s102.87x
🌐 MongoDBNext.js (Turbopack)0.128s (+144.6% 🔺)1.014s (~)0.887s103.36x
🐘 PostgresNext.js (Turbopack)0.232s (+78.0% 🔺)1.022s (~)0.790s106.11x
🐘 PostgresNitro0.323s (+50.0% 🔺)1.022s (-1.1%)0.698s108.51x
🐘 PostgresExpress0.355s (+3.4%)1.013s (~)0.658s109.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.561s (-6.6% 🟢)1.462s (-12.4% 🟢)0.901s101.00x
▲ VercelNitro0.563s (-9.9% 🟢)1.692s (+0.6%)1.129s101.00x
▲ VercelExpress0.661s (-17.0% 🟢)1.640s (-7.9% 🟢)0.979s101.18x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.084s (-0.7%)2.011s (~)0.927s101.00x
💻 LocalNext.js (Turbopack)1.096s (~)2.011s (~)0.916s101.01x
🌐 RedisNext.js (Turbopack)1.100s (~)2.012s (~)0.912s101.02x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.03x
💻 LocalExpress1.117s (+0.7%)2.007s (~)0.890s101.03x
🌐 TursoNext.js (Turbopack)1.276s (~)2.013s (~)0.737s101.18x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.012s (~)0.705s101.21x
🐘 PostgresNext.js (Turbopack)1.871s (-3.0%)2.017s (-4.8%)0.146s101.73x
🐘 PostgresNitro2.098s (-14.5% 🟢)3.012s (~)0.913s101.94x
🐘 PostgresExpress2.202s (+0.6%)3.015s (~)0.813s102.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.615s (-3.3%)3.706s (+3.4%)1.091s101.00x
▲ VercelNext.js (Turbopack)2.823s (+1.9%)3.697s (-0.8%)0.874s101.08x
▲ VercelNitro2.868s (+9.3% 🔺)3.730s (+1.4%)0.862s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.570s (~)11.011s (~)0.441s51.00x
💻 LocalNext.js (Turbopack)10.638s (~)11.015s (~)0.377s51.01x
🌐 RedisNext.js (Turbopack)10.665s (~)11.013s (~)0.349s51.01x
💻 LocalNitro10.784s (~)11.012s (~)0.228s51.02x
💻 LocalExpress10.826s (~)11.014s (~)0.188s51.02x
🌐 TursoNext.js (Turbopack)12.187s (~)13.023s (~)0.836s51.15x
🌐 MongoDBNext.js (Turbopack)12.258s (~)13.024s (~)0.766s51.16x
🐘 PostgresNext.js (Turbopack)15.184s (~)16.036s (~)0.853s51.44x
🐘 PostgresExpress20.415s (~)21.035s (~)0.620s51.93x
🐘 PostgresNitro20.474s (+0.7%)21.029s (~)0.555s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)22.213s (+4.2%)22.975s (+3.8%)0.762s51.00x
▲ VercelExpress22.298s (+5.1% 🔺)23.243s (+4.9%)0.946s51.00x
▲ VercelNitro22.365s (+4.2%)22.984s (+2.3%)0.619s51.01x

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

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.336s (-1.0%)2.009s (~)0.674s51.00x
💻 LocalNext.js (Turbopack)1.344s (-1.3%)2.010s (~)0.666s51.01x
🌐 StarterNext.js (Turbopack)1.348s (-1.1%)2.009s (~)0.662s51.01x
💻 LocalNitro1.396s (-1.0%)2.006s (~)0.610s51.04x
💻 LocalExpress1.397s (~)2.007s (~)0.611s51.05x
🐘 PostgresNext.js (Turbopack)1.916s (-13.9% 🟢)2.420s (-19.8% 🟢)0.504s51.43x
🌐 MongoDBNext.js (Turbopack)2.119s (~)3.016s (~)0.897s51.59x
🌐 TursoNext.js (Turbopack)2.188s (-1.1%)3.012s (~)0.823s51.64x
🐘 PostgresNitro2.588s (+6.5% 🔺)3.013s (~)0.425s51.94x
🐘 PostgresExpress2.614s (~)3.011s (~)0.397s51.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.089s (+2.9%)4.611s (-1.5%)0.521s51.00x
▲ VercelExpress4.137s (+3.3%)5.030s (+5.6% 🔺)0.893s51.01x
▲ VercelNitro4.245s (+4.3%)5.018s (+1.1%)0.773s51.04x

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

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.674s (+4.1%)7.059s (+4.3%)0.386s51.00x
🌐 RedisNext.js (Turbopack)8.127s (+1.5%)8.335s (-1.3%)0.208s41.22x
🐘 PostgresNext.js (Turbopack)8.922s (-1.4%)9.136s (-1.4%)0.213s41.34x
🐘 PostgresNitro9.014s (+2.2%)9.468s (+4.1%)0.454s41.35x
🐘 PostgresExpress9.107s (~)9.320s (-2.0%)0.212s41.36x
💻 LocalNitro13.492s (-9.4% 🟢)13.637s (-9.1% 🟢)0.145s32.02x
💻 LocalExpress14.003s (+6.2% 🔺)14.303s (+7.3% 🔺)0.300s32.10x
💻 LocalNext.js (Turbopack)14.182s (+2.3%)14.307s (+1.9%)0.125s32.13x
🌐 TursoNext.js (Turbopack)19.983s (~)20.531s (~)0.548s22.99x
🌐 MongoDBNext.js (Turbopack)20.202s (~)20.552s (~)0.350s23.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.339s (+6.6% 🔺)18.002s (+6.7% 🔺)0.663s21.00x
▲ VercelNitro18.321s (+15.8% 🔺)19.158s (+16.8% 🔺)0.837s21.06x
▲ VercelNext.js (Turbopack)18.931s (+19.1% 🔺)19.529s (+20.2% 🔺)0.598s21.09x

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

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.744s (+0.9%)7.020s (+1.4%)0.276s51.00x
🌐 RedisNext.js (Turbopack)8.447s (-2.9%)8.980s (+1.0%)0.533s41.25x
🐘 PostgresExpress9.244s (-8.4% 🟢)9.566s (-6.4% 🟢)0.322s41.37x
🐘 PostgresNitro9.788s (+7.0% 🔺)9.985s (+4.1%)0.197s41.45x
🐘 PostgresNext.js (Turbopack)9.833s (+8.1% 🔺)10.223s (+7.6% 🔺)0.391s31.46x
💻 LocalNitro14.211s (-6.8% 🟢)14.403s (-10.0% 🟢)0.192s32.11x
💻 LocalNext.js (Turbopack)15.074s (+1.1%)15.485s (+3.0%)0.411s22.24x
💻 LocalExpress15.466s (+0.7%)16.030s (+3.5%)0.564s22.29x
🌐 MongoDBNext.js (Turbopack)19.803s (-0.6%)20.025s (-2.5%)0.222s22.94x
🌐 TursoNext.js (Turbopack)20.037s (-1.4%)20.555s (~)0.518s22.97x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.127s (-5.3% 🟢)16.549s (-7.1% 🟢)0.422s21.00x
▲ VercelExpress16.578s (-12.5% 🟢)17.443s (-11.4% 🟢)0.866s21.03x
▲ VercelNext.js (Turbopack)39.338s (+146.2% 🔺)39.640s (+138.2% 🔺)0.302s12.44x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.124s (-1.9%)1.005s (~)0.000s (NaN%)1.010s (~)0.887s101.00x
💻 LocalNext.js (Turbopack)0.131s (-3.9%)1.003s (~)0.015s (-3.8%)1.025s (~)0.894s101.06x
🌐 RedisNext.js (Turbopack)0.142s (~)1.005s (~)0.000s (NaN%)1.014s (~)0.872s101.15x
💻 LocalNitro0.173s (-3.3%)0.992s (~)0.013s (-12.0% 🟢)1.019s (~)0.846s101.40x
💻 LocalExpress0.180s (-1.4%)0.991s (~)0.016s (+17.4% 🔺)1.023s (~)0.843s101.46x
🌐 TursoNext.js (Turbopack)0.500s (-2.2%)0.952s (+1.1%)0.000s (-100.0% 🟢)1.013s (~)0.512s104.04x
🌐 MongoDBNext.js (Turbopack)0.521s (+1.6%)0.928s (-1.2%)0.000s (-100.0% 🟢)1.012s (~)0.491s104.21x
🐘 PostgresNext.js (Turbopack)0.893s (+36.5% 🔺)0.999s (+9.4% 🔺)0.000s (-70.0% 🟢)1.216s (+19.8% 🔺)0.323s107.21x
🐘 PostgresNitro1.470s (-33.9% 🟢)2.018s (-28.5% 🟢)0.000s (NaN%)2.213s (-26.6% 🟢)0.743s1011.87x
🐘 PostgresExpress2.260s (+5.1% 🔺)2.785s (+3.0%)0.000s (NaN%)3.015s (+3.4%)0.755s1018.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.759s (+4.2%)3.223s (-0.7%)0.384s (+0.7%)4.020s (-0.9%)1.261s101.00x
▲ VercelExpress2.867s (+12.2% 🔺)3.212s (+1.2%)1.059s (+508.0% 🔺)4.777s (+26.7% 🔺)1.910s101.04x
▲ VercelNitro3.056s (+13.1% 🔺)3.528s (+8.2% 🔺)0.471s (+53.4% 🔺)4.494s (+11.7% 🔺)1.438s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNext.js (Turbopack)4/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter6/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@vercelvercelBot 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.

Additional Suggestion:

The JSDoc comment for the probePort function is outdated and doesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.

View Details
📝 Patch Details
diff --git a/packages/utils/src/get-port.ts b/packages/utils/src/get-port.ts
index d4c4a28..24dca4a 100644
--- a/packages/utils/src/get-port.ts+++ b/packages/utils/src/get-port.ts@@ -248,7 +248,7 @@ export interface ProbeOptions {
* Probes a port to check if it's serving the workflow HTTP server.
* Uses HEAD request to minimize overhead.
*
- * @returns true if the port responds as a workflow server (non-404 response)+ * @returns true if the port responds with a 200 status from the health check endpoint
*/
async function probePort(
port: number,

Analysis

Outdated JSDoc comment in probePort() function doesn't match implementation

What fails: The JSDoc comment at line 251 of packages/utils/src/get-port.ts claims the probePort() function @returns true if the port responds as a workflow server (non-404 response), but the actual implementation at line 269 explicitly checks return response.status === 200;

How to reproduce:

  1. Read the JSDoc comment for probePort() function in packages/utils/src/get-port.ts (line 251)
  2. Read the implementation at lines 268-269
  3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200

What happened vs expected behavior:

  • The code behavior was changed in commit 34cb235 (Dec 15, 2025) from checking response.status !== 404 to checking response.status === 200
  • The internal code comments were updated in commit 5840ab2, but the JSDoc was left outdated
  • Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200

Fix: Updated the JSDoc @returns line to accurately reflect the implementation: @returns true if the port responds with a 200 status from the health check endpoint

Verification: All 19 tests in packages/utils/src/get-port.test.ts pass with the updated documentation.

Fix on Vercel

@adriandlamadriandlam changed the title chore: use workflow health endpoint to check for portfix: use workflow health endpoint to check for portDec 16, 2025
…oesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.
This commit fixes the issue reported at packages/utils/src/get-port.ts:251
## Outdated JSDoc comment in probePort() function doesn't match implementation
**What fails:** The JSDoc comment at line 251 of `packages/utils/src/get-port.ts` claims the `probePort()` function `@returns true if the port responds as a workflow server (non-404 response)`, but the actual implementation at line 269 explicitly checks `return response.status === 200;`
**How to reproduce:**
1. Read the JSDoc comment for `probePort()` function in `packages/utils/src/get-port.ts` (line 251)
2. Read the implementation at lines 268-269
3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200
**What happened vs expected behavior:**
- The code behavior was changed in commit `34cb235` (Dec 15, 2025) from checking `response.status !== 404` to checking `response.status === 200`
- The internal code comments were updated in commit `5840ab2`, but the JSDoc was left outdated
- Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200
**Fix:** Updated the JSDoc `@returns` line to accurately reflect the implementation: `@returns true if the port responds with a 200 status from the health check endpoint`
**Verification:** All 19 tests in `packages/utils/src/get-port.test.ts` pass with the updated documentation.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@TooTallNate

Copy link
Copy Markdown
Member

@ijjk Would this cause a problem with the lazy bundling that you're thinking of implementing?

@ijjk

ijjk commented Dec 16, 2025

Copy link
Copy Markdown
Member

This shouldn't cause a conflict with that no

@adriandlam
adriandlam merged commit 1ef6b2f into mainDec 16, 2025
89 of 90 checks passed
@adriandlam
adriandlam deleted the chore/probe-health-endpoint branch December 16, 2025 00:34
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.

3 participants

@adriandlam@TooTallNate@ijjk
, '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

fix: use workflow health endpoint to check for port - #616

Merged
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint
Dec 16, 2025
Merged

fix: use workflow health endpoint to check for port#616
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint

Conversation

@adriandlam

Copy link
Copy Markdown
Contributor

instead of pinging the flow workflow endpoint to check for port and looking for non-404s, we ping the health check endpoint for workflow at http://localhost:${PORT}/.well-known/workflow/v1/flow?__health for 200

@changeset-bot

changeset-botBot commented Dec 15, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa8510e

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

This PR includes changesets to release 17 packages
NameType
@workflow/utilsPatch
@workflow/corePatch
@workflow/errorsPatch
@workflow/world-localPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch

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

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

@vercel

vercelBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 15, 2025

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
🌐 Starter🥇 Next.js (Turbopack)0.038s (-0.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.038s (-5.0%)1.017s (~)0.978s101.01x
🌐 RedisNext.js (Turbopack)0.040s (-3.4%)1.016s (~)0.976s101.05x
💻 LocalNitro0.043s (-0.7%)1.006s (~)0.963s101.14x
💻 LocalExpress0.048s (+9.7% 🔺)1.008s (~)0.960s101.25x
🌐 TursoNext.js (Turbopack)0.109s (+43.5% 🔺)1.013s (~)0.904s102.87x
🌐 MongoDBNext.js (Turbopack)0.128s (+144.6% 🔺)1.014s (~)0.887s103.36x
🐘 PostgresNext.js (Turbopack)0.232s (+78.0% 🔺)1.022s (~)0.790s106.11x
🐘 PostgresNitro0.323s (+50.0% 🔺)1.022s (-1.1%)0.698s108.51x
🐘 PostgresExpress0.355s (+3.4%)1.013s (~)0.658s109.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.561s (-6.6% 🟢)1.462s (-12.4% 🟢)0.901s101.00x
▲ VercelNitro0.563s (-9.9% 🟢)1.692s (+0.6%)1.129s101.00x
▲ VercelExpress0.661s (-17.0% 🟢)1.640s (-7.9% 🟢)0.979s101.18x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.084s (-0.7%)2.011s (~)0.927s101.00x
💻 LocalNext.js (Turbopack)1.096s (~)2.011s (~)0.916s101.01x
🌐 RedisNext.js (Turbopack)1.100s (~)2.012s (~)0.912s101.02x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.03x
💻 LocalExpress1.117s (+0.7%)2.007s (~)0.890s101.03x
🌐 TursoNext.js (Turbopack)1.276s (~)2.013s (~)0.737s101.18x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.012s (~)0.705s101.21x
🐘 PostgresNext.js (Turbopack)1.871s (-3.0%)2.017s (-4.8%)0.146s101.73x
🐘 PostgresNitro2.098s (-14.5% 🟢)3.012s (~)0.913s101.94x
🐘 PostgresExpress2.202s (+0.6%)3.015s (~)0.813s102.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.615s (-3.3%)3.706s (+3.4%)1.091s101.00x
▲ VercelNext.js (Turbopack)2.823s (+1.9%)3.697s (-0.8%)0.874s101.08x
▲ VercelNitro2.868s (+9.3% 🔺)3.730s (+1.4%)0.862s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.570s (~)11.011s (~)0.441s51.00x
💻 LocalNext.js (Turbopack)10.638s (~)11.015s (~)0.377s51.01x
🌐 RedisNext.js (Turbopack)10.665s (~)11.013s (~)0.349s51.01x
💻 LocalNitro10.784s (~)11.012s (~)0.228s51.02x
💻 LocalExpress10.826s (~)11.014s (~)0.188s51.02x
🌐 TursoNext.js (Turbopack)12.187s (~)13.023s (~)0.836s51.15x
🌐 MongoDBNext.js (Turbopack)12.258s (~)13.024s (~)0.766s51.16x
🐘 PostgresNext.js (Turbopack)15.184s (~)16.036s (~)0.853s51.44x
🐘 PostgresExpress20.415s (~)21.035s (~)0.620s51.93x
🐘 PostgresNitro20.474s (+0.7%)21.029s (~)0.555s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)22.213s (+4.2%)22.975s (+3.8%)0.762s51.00x
▲ VercelExpress22.298s (+5.1% 🔺)23.243s (+4.9%)0.946s51.00x
▲ VercelNitro22.365s (+4.2%)22.984s (+2.3%)0.619s51.01x

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

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.336s (-1.0%)2.009s (~)0.674s51.00x
💻 LocalNext.js (Turbopack)1.344s (-1.3%)2.010s (~)0.666s51.01x
🌐 StarterNext.js (Turbopack)1.348s (-1.1%)2.009s (~)0.662s51.01x
💻 LocalNitro1.396s (-1.0%)2.006s (~)0.610s51.04x
💻 LocalExpress1.397s (~)2.007s (~)0.611s51.05x
🐘 PostgresNext.js (Turbopack)1.916s (-13.9% 🟢)2.420s (-19.8% 🟢)0.504s51.43x
🌐 MongoDBNext.js (Turbopack)2.119s (~)3.016s (~)0.897s51.59x
🌐 TursoNext.js (Turbopack)2.188s (-1.1%)3.012s (~)0.823s51.64x
🐘 PostgresNitro2.588s (+6.5% 🔺)3.013s (~)0.425s51.94x
🐘 PostgresExpress2.614s (~)3.011s (~)0.397s51.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.089s (+2.9%)4.611s (-1.5%)0.521s51.00x
▲ VercelExpress4.137s (+3.3%)5.030s (+5.6% 🔺)0.893s51.01x
▲ VercelNitro4.245s (+4.3%)5.018s (+1.1%)0.773s51.04x

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

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.674s (+4.1%)7.059s (+4.3%)0.386s51.00x
🌐 RedisNext.js (Turbopack)8.127s (+1.5%)8.335s (-1.3%)0.208s41.22x
🐘 PostgresNext.js (Turbopack)8.922s (-1.4%)9.136s (-1.4%)0.213s41.34x
🐘 PostgresNitro9.014s (+2.2%)9.468s (+4.1%)0.454s41.35x
🐘 PostgresExpress9.107s (~)9.320s (-2.0%)0.212s41.36x
💻 LocalNitro13.492s (-9.4% 🟢)13.637s (-9.1% 🟢)0.145s32.02x
💻 LocalExpress14.003s (+6.2% 🔺)14.303s (+7.3% 🔺)0.300s32.10x
💻 LocalNext.js (Turbopack)14.182s (+2.3%)14.307s (+1.9%)0.125s32.13x
🌐 TursoNext.js (Turbopack)19.983s (~)20.531s (~)0.548s22.99x
🌐 MongoDBNext.js (Turbopack)20.202s (~)20.552s (~)0.350s23.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.339s (+6.6% 🔺)18.002s (+6.7% 🔺)0.663s21.00x
▲ VercelNitro18.321s (+15.8% 🔺)19.158s (+16.8% 🔺)0.837s21.06x
▲ VercelNext.js (Turbopack)18.931s (+19.1% 🔺)19.529s (+20.2% 🔺)0.598s21.09x

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

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.744s (+0.9%)7.020s (+1.4%)0.276s51.00x
🌐 RedisNext.js (Turbopack)8.447s (-2.9%)8.980s (+1.0%)0.533s41.25x
🐘 PostgresExpress9.244s (-8.4% 🟢)9.566s (-6.4% 🟢)0.322s41.37x
🐘 PostgresNitro9.788s (+7.0% 🔺)9.985s (+4.1%)0.197s41.45x
🐘 PostgresNext.js (Turbopack)9.833s (+8.1% 🔺)10.223s (+7.6% 🔺)0.391s31.46x
💻 LocalNitro14.211s (-6.8% 🟢)14.403s (-10.0% 🟢)0.192s32.11x
💻 LocalNext.js (Turbopack)15.074s (+1.1%)15.485s (+3.0%)0.411s22.24x
💻 LocalExpress15.466s (+0.7%)16.030s (+3.5%)0.564s22.29x
🌐 MongoDBNext.js (Turbopack)19.803s (-0.6%)20.025s (-2.5%)0.222s22.94x
🌐 TursoNext.js (Turbopack)20.037s (-1.4%)20.555s (~)0.518s22.97x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.127s (-5.3% 🟢)16.549s (-7.1% 🟢)0.422s21.00x
▲ VercelExpress16.578s (-12.5% 🟢)17.443s (-11.4% 🟢)0.866s21.03x
▲ VercelNext.js (Turbopack)39.338s (+146.2% 🔺)39.640s (+138.2% 🔺)0.302s12.44x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.124s (-1.9%)1.005s (~)0.000s (NaN%)1.010s (~)0.887s101.00x
💻 LocalNext.js (Turbopack)0.131s (-3.9%)1.003s (~)0.015s (-3.8%)1.025s (~)0.894s101.06x
🌐 RedisNext.js (Turbopack)0.142s (~)1.005s (~)0.000s (NaN%)1.014s (~)0.872s101.15x
💻 LocalNitro0.173s (-3.3%)0.992s (~)0.013s (-12.0% 🟢)1.019s (~)0.846s101.40x
💻 LocalExpress0.180s (-1.4%)0.991s (~)0.016s (+17.4% 🔺)1.023s (~)0.843s101.46x
🌐 TursoNext.js (Turbopack)0.500s (-2.2%)0.952s (+1.1%)0.000s (-100.0% 🟢)1.013s (~)0.512s104.04x
🌐 MongoDBNext.js (Turbopack)0.521s (+1.6%)0.928s (-1.2%)0.000s (-100.0% 🟢)1.012s (~)0.491s104.21x
🐘 PostgresNext.js (Turbopack)0.893s (+36.5% 🔺)0.999s (+9.4% 🔺)0.000s (-70.0% 🟢)1.216s (+19.8% 🔺)0.323s107.21x
🐘 PostgresNitro1.470s (-33.9% 🟢)2.018s (-28.5% 🟢)0.000s (NaN%)2.213s (-26.6% 🟢)0.743s1011.87x
🐘 PostgresExpress2.260s (+5.1% 🔺)2.785s (+3.0%)0.000s (NaN%)3.015s (+3.4%)0.755s1018.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.759s (+4.2%)3.223s (-0.7%)0.384s (+0.7%)4.020s (-0.9%)1.261s101.00x
▲ VercelExpress2.867s (+12.2% 🔺)3.212s (+1.2%)1.059s (+508.0% 🔺)4.777s (+26.7% 🔺)1.910s101.04x
▲ VercelNitro3.056s (+13.1% 🔺)3.528s (+8.2% 🔺)0.471s (+53.4% 🔺)4.494s (+11.7% 🔺)1.438s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNext.js (Turbopack)4/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter6/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@vercelvercelBot 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.

Additional Suggestion:

The JSDoc comment for the probePort function is outdated and doesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.

View Details
📝 Patch Details
diff --git a/packages/utils/src/get-port.ts b/packages/utils/src/get-port.ts
index d4c4a28..24dca4a 100644
--- a/packages/utils/src/get-port.ts+++ b/packages/utils/src/get-port.ts@@ -248,7 +248,7 @@ export interface ProbeOptions {
* Probes a port to check if it's serving the workflow HTTP server.
* Uses HEAD request to minimize overhead.
*
- * @returns true if the port responds as a workflow server (non-404 response)+ * @returns true if the port responds with a 200 status from the health check endpoint
*/
async function probePort(
port: number,

Analysis

Outdated JSDoc comment in probePort() function doesn't match implementation

What fails: The JSDoc comment at line 251 of packages/utils/src/get-port.ts claims the probePort() function @returns true if the port responds as a workflow server (non-404 response), but the actual implementation at line 269 explicitly checks return response.status === 200;

How to reproduce:

  1. Read the JSDoc comment for probePort() function in packages/utils/src/get-port.ts (line 251)
  2. Read the implementation at lines 268-269
  3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200

What happened vs expected behavior:

  • The code behavior was changed in commit 34cb235 (Dec 15, 2025) from checking response.status !== 404 to checking response.status === 200
  • The internal code comments were updated in commit 5840ab2, but the JSDoc was left outdated
  • Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200

Fix: Updated the JSDoc @returns line to accurately reflect the implementation: @returns true if the port responds with a 200 status from the health check endpoint

Verification: All 19 tests in packages/utils/src/get-port.test.ts pass with the updated documentation.

Fix on Vercel

@adriandlamadriandlam changed the title chore: use workflow health endpoint to check for portfix: use workflow health endpoint to check for portDec 16, 2025
…oesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.
This commit fixes the issue reported at packages/utils/src/get-port.ts:251
## Outdated JSDoc comment in probePort() function doesn't match implementation
**What fails:** The JSDoc comment at line 251 of `packages/utils/src/get-port.ts` claims the `probePort()` function `@returns true if the port responds as a workflow server (non-404 response)`, but the actual implementation at line 269 explicitly checks `return response.status === 200;`
**How to reproduce:**
1. Read the JSDoc comment for `probePort()` function in `packages/utils/src/get-port.ts` (line 251)
2. Read the implementation at lines 268-269
3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200
**What happened vs expected behavior:**
- The code behavior was changed in commit `34cb235` (Dec 15, 2025) from checking `response.status !== 404` to checking `response.status === 200`
- The internal code comments were updated in commit `5840ab2`, but the JSDoc was left outdated
- Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200
**Fix:** Updated the JSDoc `@returns` line to accurately reflect the implementation: `@returns true if the port responds with a 200 status from the health check endpoint`
**Verification:** All 19 tests in `packages/utils/src/get-port.test.ts` pass with the updated documentation.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@TooTallNate

Copy link
Copy Markdown
Member

@ijjk Would this cause a problem with the lazy bundling that you're thinking of implementing?

@ijjk

ijjk commented Dec 16, 2025

Copy link
Copy Markdown
Member

This shouldn't cause a conflict with that no

@adriandlam
adriandlam merged commit 1ef6b2f into mainDec 16, 2025
89 of 90 checks passed
@adriandlam
adriandlam deleted the chore/probe-health-endpoint branch December 16, 2025 00:34
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.

3 participants

@adriandlam@TooTallNate@ijjk
, '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

fix: use workflow health endpoint to check for port - #616

Merged
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint
Dec 16, 2025
Merged

fix: use workflow health endpoint to check for port#616
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint

Conversation

@adriandlam

Copy link
Copy Markdown
Contributor

instead of pinging the flow workflow endpoint to check for port and looking for non-404s, we ping the health check endpoint for workflow at http://localhost:${PORT}/.well-known/workflow/v1/flow?__health for 200

@changeset-bot

changeset-botBot commented Dec 15, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa8510e

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

This PR includes changesets to release 17 packages
NameType
@workflow/utilsPatch
@workflow/corePatch
@workflow/errorsPatch
@workflow/world-localPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch

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

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

@vercel

vercelBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 15, 2025

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
🌐 Starter🥇 Next.js (Turbopack)0.038s (-0.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.038s (-5.0%)1.017s (~)0.978s101.01x
🌐 RedisNext.js (Turbopack)0.040s (-3.4%)1.016s (~)0.976s101.05x
💻 LocalNitro0.043s (-0.7%)1.006s (~)0.963s101.14x
💻 LocalExpress0.048s (+9.7% 🔺)1.008s (~)0.960s101.25x
🌐 TursoNext.js (Turbopack)0.109s (+43.5% 🔺)1.013s (~)0.904s102.87x
🌐 MongoDBNext.js (Turbopack)0.128s (+144.6% 🔺)1.014s (~)0.887s103.36x
🐘 PostgresNext.js (Turbopack)0.232s (+78.0% 🔺)1.022s (~)0.790s106.11x
🐘 PostgresNitro0.323s (+50.0% 🔺)1.022s (-1.1%)0.698s108.51x
🐘 PostgresExpress0.355s (+3.4%)1.013s (~)0.658s109.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.561s (-6.6% 🟢)1.462s (-12.4% 🟢)0.901s101.00x
▲ VercelNitro0.563s (-9.9% 🟢)1.692s (+0.6%)1.129s101.00x
▲ VercelExpress0.661s (-17.0% 🟢)1.640s (-7.9% 🟢)0.979s101.18x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.084s (-0.7%)2.011s (~)0.927s101.00x
💻 LocalNext.js (Turbopack)1.096s (~)2.011s (~)0.916s101.01x
🌐 RedisNext.js (Turbopack)1.100s (~)2.012s (~)0.912s101.02x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.03x
💻 LocalExpress1.117s (+0.7%)2.007s (~)0.890s101.03x
🌐 TursoNext.js (Turbopack)1.276s (~)2.013s (~)0.737s101.18x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.012s (~)0.705s101.21x
🐘 PostgresNext.js (Turbopack)1.871s (-3.0%)2.017s (-4.8%)0.146s101.73x
🐘 PostgresNitro2.098s (-14.5% 🟢)3.012s (~)0.913s101.94x
🐘 PostgresExpress2.202s (+0.6%)3.015s (~)0.813s102.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.615s (-3.3%)3.706s (+3.4%)1.091s101.00x
▲ VercelNext.js (Turbopack)2.823s (+1.9%)3.697s (-0.8%)0.874s101.08x
▲ VercelNitro2.868s (+9.3% 🔺)3.730s (+1.4%)0.862s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.570s (~)11.011s (~)0.441s51.00x
💻 LocalNext.js (Turbopack)10.638s (~)11.015s (~)0.377s51.01x
🌐 RedisNext.js (Turbopack)10.665s (~)11.013s (~)0.349s51.01x
💻 LocalNitro10.784s (~)11.012s (~)0.228s51.02x
💻 LocalExpress10.826s (~)11.014s (~)0.188s51.02x
🌐 TursoNext.js (Turbopack)12.187s (~)13.023s (~)0.836s51.15x
🌐 MongoDBNext.js (Turbopack)12.258s (~)13.024s (~)0.766s51.16x
🐘 PostgresNext.js (Turbopack)15.184s (~)16.036s (~)0.853s51.44x
🐘 PostgresExpress20.415s (~)21.035s (~)0.620s51.93x
🐘 PostgresNitro20.474s (+0.7%)21.029s (~)0.555s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)22.213s (+4.2%)22.975s (+3.8%)0.762s51.00x
▲ VercelExpress22.298s (+5.1% 🔺)23.243s (+4.9%)0.946s51.00x
▲ VercelNitro22.365s (+4.2%)22.984s (+2.3%)0.619s51.01x

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

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.336s (-1.0%)2.009s (~)0.674s51.00x
💻 LocalNext.js (Turbopack)1.344s (-1.3%)2.010s (~)0.666s51.01x
🌐 StarterNext.js (Turbopack)1.348s (-1.1%)2.009s (~)0.662s51.01x
💻 LocalNitro1.396s (-1.0%)2.006s (~)0.610s51.04x
💻 LocalExpress1.397s (~)2.007s (~)0.611s51.05x
🐘 PostgresNext.js (Turbopack)1.916s (-13.9% 🟢)2.420s (-19.8% 🟢)0.504s51.43x
🌐 MongoDBNext.js (Turbopack)2.119s (~)3.016s (~)0.897s51.59x
🌐 TursoNext.js (Turbopack)2.188s (-1.1%)3.012s (~)0.823s51.64x
🐘 PostgresNitro2.588s (+6.5% 🔺)3.013s (~)0.425s51.94x
🐘 PostgresExpress2.614s (~)3.011s (~)0.397s51.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.089s (+2.9%)4.611s (-1.5%)0.521s51.00x
▲ VercelExpress4.137s (+3.3%)5.030s (+5.6% 🔺)0.893s51.01x
▲ VercelNitro4.245s (+4.3%)5.018s (+1.1%)0.773s51.04x

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

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.674s (+4.1%)7.059s (+4.3%)0.386s51.00x
🌐 RedisNext.js (Turbopack)8.127s (+1.5%)8.335s (-1.3%)0.208s41.22x
🐘 PostgresNext.js (Turbopack)8.922s (-1.4%)9.136s (-1.4%)0.213s41.34x
🐘 PostgresNitro9.014s (+2.2%)9.468s (+4.1%)0.454s41.35x
🐘 PostgresExpress9.107s (~)9.320s (-2.0%)0.212s41.36x
💻 LocalNitro13.492s (-9.4% 🟢)13.637s (-9.1% 🟢)0.145s32.02x
💻 LocalExpress14.003s (+6.2% 🔺)14.303s (+7.3% 🔺)0.300s32.10x
💻 LocalNext.js (Turbopack)14.182s (+2.3%)14.307s (+1.9%)0.125s32.13x
🌐 TursoNext.js (Turbopack)19.983s (~)20.531s (~)0.548s22.99x
🌐 MongoDBNext.js (Turbopack)20.202s (~)20.552s (~)0.350s23.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.339s (+6.6% 🔺)18.002s (+6.7% 🔺)0.663s21.00x
▲ VercelNitro18.321s (+15.8% 🔺)19.158s (+16.8% 🔺)0.837s21.06x
▲ VercelNext.js (Turbopack)18.931s (+19.1% 🔺)19.529s (+20.2% 🔺)0.598s21.09x

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

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.744s (+0.9%)7.020s (+1.4%)0.276s51.00x
🌐 RedisNext.js (Turbopack)8.447s (-2.9%)8.980s (+1.0%)0.533s41.25x
🐘 PostgresExpress9.244s (-8.4% 🟢)9.566s (-6.4% 🟢)0.322s41.37x
🐘 PostgresNitro9.788s (+7.0% 🔺)9.985s (+4.1%)0.197s41.45x
🐘 PostgresNext.js (Turbopack)9.833s (+8.1% 🔺)10.223s (+7.6% 🔺)0.391s31.46x
💻 LocalNitro14.211s (-6.8% 🟢)14.403s (-10.0% 🟢)0.192s32.11x
💻 LocalNext.js (Turbopack)15.074s (+1.1%)15.485s (+3.0%)0.411s22.24x
💻 LocalExpress15.466s (+0.7%)16.030s (+3.5%)0.564s22.29x
🌐 MongoDBNext.js (Turbopack)19.803s (-0.6%)20.025s (-2.5%)0.222s22.94x
🌐 TursoNext.js (Turbopack)20.037s (-1.4%)20.555s (~)0.518s22.97x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.127s (-5.3% 🟢)16.549s (-7.1% 🟢)0.422s21.00x
▲ VercelExpress16.578s (-12.5% 🟢)17.443s (-11.4% 🟢)0.866s21.03x
▲ VercelNext.js (Turbopack)39.338s (+146.2% 🔺)39.640s (+138.2% 🔺)0.302s12.44x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.124s (-1.9%)1.005s (~)0.000s (NaN%)1.010s (~)0.887s101.00x
💻 LocalNext.js (Turbopack)0.131s (-3.9%)1.003s (~)0.015s (-3.8%)1.025s (~)0.894s101.06x
🌐 RedisNext.js (Turbopack)0.142s (~)1.005s (~)0.000s (NaN%)1.014s (~)0.872s101.15x
💻 LocalNitro0.173s (-3.3%)0.992s (~)0.013s (-12.0% 🟢)1.019s (~)0.846s101.40x
💻 LocalExpress0.180s (-1.4%)0.991s (~)0.016s (+17.4% 🔺)1.023s (~)0.843s101.46x
🌐 TursoNext.js (Turbopack)0.500s (-2.2%)0.952s (+1.1%)0.000s (-100.0% 🟢)1.013s (~)0.512s104.04x
🌐 MongoDBNext.js (Turbopack)0.521s (+1.6%)0.928s (-1.2%)0.000s (-100.0% 🟢)1.012s (~)0.491s104.21x
🐘 PostgresNext.js (Turbopack)0.893s (+36.5% 🔺)0.999s (+9.4% 🔺)0.000s (-70.0% 🟢)1.216s (+19.8% 🔺)0.323s107.21x
🐘 PostgresNitro1.470s (-33.9% 🟢)2.018s (-28.5% 🟢)0.000s (NaN%)2.213s (-26.6% 🟢)0.743s1011.87x
🐘 PostgresExpress2.260s (+5.1% 🔺)2.785s (+3.0%)0.000s (NaN%)3.015s (+3.4%)0.755s1018.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.759s (+4.2%)3.223s (-0.7%)0.384s (+0.7%)4.020s (-0.9%)1.261s101.00x
▲ VercelExpress2.867s (+12.2% 🔺)3.212s (+1.2%)1.059s (+508.0% 🔺)4.777s (+26.7% 🔺)1.910s101.04x
▲ VercelNitro3.056s (+13.1% 🔺)3.528s (+8.2% 🔺)0.471s (+53.4% 🔺)4.494s (+11.7% 🔺)1.438s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNext.js (Turbopack)4/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter6/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@vercelvercelBot 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.

Additional Suggestion:

The JSDoc comment for the probePort function is outdated and doesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.

View Details
📝 Patch Details
diff --git a/packages/utils/src/get-port.ts b/packages/utils/src/get-port.ts
index d4c4a28..24dca4a 100644
--- a/packages/utils/src/get-port.ts+++ b/packages/utils/src/get-port.ts@@ -248,7 +248,7 @@ export interface ProbeOptions {
* Probes a port to check if it's serving the workflow HTTP server.
* Uses HEAD request to minimize overhead.
*
- * @returns true if the port responds as a workflow server (non-404 response)+ * @returns true if the port responds with a 200 status from the health check endpoint
*/
async function probePort(
port: number,

Analysis

Outdated JSDoc comment in probePort() function doesn't match implementation

What fails: The JSDoc comment at line 251 of packages/utils/src/get-port.ts claims the probePort() function @returns true if the port responds as a workflow server (non-404 response), but the actual implementation at line 269 explicitly checks return response.status === 200;

How to reproduce:

  1. Read the JSDoc comment for probePort() function in packages/utils/src/get-port.ts (line 251)
  2. Read the implementation at lines 268-269
  3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200

What happened vs expected behavior:

  • The code behavior was changed in commit 34cb235 (Dec 15, 2025) from checking response.status !== 404 to checking response.status === 200
  • The internal code comments were updated in commit 5840ab2, but the JSDoc was left outdated
  • Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200

Fix: Updated the JSDoc @returns line to accurately reflect the implementation: @returns true if the port responds with a 200 status from the health check endpoint

Verification: All 19 tests in packages/utils/src/get-port.test.ts pass with the updated documentation.

Fix on Vercel

@adriandlamadriandlam changed the title chore: use workflow health endpoint to check for portfix: use workflow health endpoint to check for portDec 16, 2025
…oesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.
This commit fixes the issue reported at packages/utils/src/get-port.ts:251
## Outdated JSDoc comment in probePort() function doesn't match implementation
**What fails:** The JSDoc comment at line 251 of `packages/utils/src/get-port.ts` claims the `probePort()` function `@returns true if the port responds as a workflow server (non-404 response)`, but the actual implementation at line 269 explicitly checks `return response.status === 200;`
**How to reproduce:**
1. Read the JSDoc comment for `probePort()` function in `packages/utils/src/get-port.ts` (line 251)
2. Read the implementation at lines 268-269
3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200
**What happened vs expected behavior:**
- The code behavior was changed in commit `34cb235` (Dec 15, 2025) from checking `response.status !== 404` to checking `response.status === 200`
- The internal code comments were updated in commit `5840ab2`, but the JSDoc was left outdated
- Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200
**Fix:** Updated the JSDoc `@returns` line to accurately reflect the implementation: `@returns true if the port responds with a 200 status from the health check endpoint`
**Verification:** All 19 tests in `packages/utils/src/get-port.test.ts` pass with the updated documentation.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@TooTallNate

Copy link
Copy Markdown
Member

@ijjk Would this cause a problem with the lazy bundling that you're thinking of implementing?

@ijjk

ijjk commented Dec 16, 2025

Copy link
Copy Markdown
Member

This shouldn't cause a conflict with that no

@adriandlam
adriandlam merged commit 1ef6b2f into mainDec 16, 2025
89 of 90 checks passed
@adriandlam
adriandlam deleted the chore/probe-health-endpoint branch December 16, 2025 00:34
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.

3 participants

@adriandlam@TooTallNate@ijjk
, '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

fix: use workflow health endpoint to check for port - #616

Merged
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint
Dec 16, 2025
Merged

fix: use workflow health endpoint to check for port#616
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint

Conversation

@adriandlam

Copy link
Copy Markdown
Contributor

instead of pinging the flow workflow endpoint to check for port and looking for non-404s, we ping the health check endpoint for workflow at http://localhost:${PORT}/.well-known/workflow/v1/flow?__health for 200

@changeset-bot

changeset-botBot commented Dec 15, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa8510e

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

This PR includes changesets to release 17 packages
NameType
@workflow/utilsPatch
@workflow/corePatch
@workflow/errorsPatch
@workflow/world-localPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch

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

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

@vercel

vercelBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 15, 2025

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
🌐 Starter🥇 Next.js (Turbopack)0.038s (-0.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.038s (-5.0%)1.017s (~)0.978s101.01x
🌐 RedisNext.js (Turbopack)0.040s (-3.4%)1.016s (~)0.976s101.05x
💻 LocalNitro0.043s (-0.7%)1.006s (~)0.963s101.14x
💻 LocalExpress0.048s (+9.7% 🔺)1.008s (~)0.960s101.25x
🌐 TursoNext.js (Turbopack)0.109s (+43.5% 🔺)1.013s (~)0.904s102.87x
🌐 MongoDBNext.js (Turbopack)0.128s (+144.6% 🔺)1.014s (~)0.887s103.36x
🐘 PostgresNext.js (Turbopack)0.232s (+78.0% 🔺)1.022s (~)0.790s106.11x
🐘 PostgresNitro0.323s (+50.0% 🔺)1.022s (-1.1%)0.698s108.51x
🐘 PostgresExpress0.355s (+3.4%)1.013s (~)0.658s109.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.561s (-6.6% 🟢)1.462s (-12.4% 🟢)0.901s101.00x
▲ VercelNitro0.563s (-9.9% 🟢)1.692s (+0.6%)1.129s101.00x
▲ VercelExpress0.661s (-17.0% 🟢)1.640s (-7.9% 🟢)0.979s101.18x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.084s (-0.7%)2.011s (~)0.927s101.00x
💻 LocalNext.js (Turbopack)1.096s (~)2.011s (~)0.916s101.01x
🌐 RedisNext.js (Turbopack)1.100s (~)2.012s (~)0.912s101.02x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.03x
💻 LocalExpress1.117s (+0.7%)2.007s (~)0.890s101.03x
🌐 TursoNext.js (Turbopack)1.276s (~)2.013s (~)0.737s101.18x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.012s (~)0.705s101.21x
🐘 PostgresNext.js (Turbopack)1.871s (-3.0%)2.017s (-4.8%)0.146s101.73x
🐘 PostgresNitro2.098s (-14.5% 🟢)3.012s (~)0.913s101.94x
🐘 PostgresExpress2.202s (+0.6%)3.015s (~)0.813s102.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.615s (-3.3%)3.706s (+3.4%)1.091s101.00x
▲ VercelNext.js (Turbopack)2.823s (+1.9%)3.697s (-0.8%)0.874s101.08x
▲ VercelNitro2.868s (+9.3% 🔺)3.730s (+1.4%)0.862s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.570s (~)11.011s (~)0.441s51.00x
💻 LocalNext.js (Turbopack)10.638s (~)11.015s (~)0.377s51.01x
🌐 RedisNext.js (Turbopack)10.665s (~)11.013s (~)0.349s51.01x
💻 LocalNitro10.784s (~)11.012s (~)0.228s51.02x
💻 LocalExpress10.826s (~)11.014s (~)0.188s51.02x
🌐 TursoNext.js (Turbopack)12.187s (~)13.023s (~)0.836s51.15x
🌐 MongoDBNext.js (Turbopack)12.258s (~)13.024s (~)0.766s51.16x
🐘 PostgresNext.js (Turbopack)15.184s (~)16.036s (~)0.853s51.44x
🐘 PostgresExpress20.415s (~)21.035s (~)0.620s51.93x
🐘 PostgresNitro20.474s (+0.7%)21.029s (~)0.555s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)22.213s (+4.2%)22.975s (+3.8%)0.762s51.00x
▲ VercelExpress22.298s (+5.1% 🔺)23.243s (+4.9%)0.946s51.00x
▲ VercelNitro22.365s (+4.2%)22.984s (+2.3%)0.619s51.01x

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

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.336s (-1.0%)2.009s (~)0.674s51.00x
💻 LocalNext.js (Turbopack)1.344s (-1.3%)2.010s (~)0.666s51.01x
🌐 StarterNext.js (Turbopack)1.348s (-1.1%)2.009s (~)0.662s51.01x
💻 LocalNitro1.396s (-1.0%)2.006s (~)0.610s51.04x
💻 LocalExpress1.397s (~)2.007s (~)0.611s51.05x
🐘 PostgresNext.js (Turbopack)1.916s (-13.9% 🟢)2.420s (-19.8% 🟢)0.504s51.43x
🌐 MongoDBNext.js (Turbopack)2.119s (~)3.016s (~)0.897s51.59x
🌐 TursoNext.js (Turbopack)2.188s (-1.1%)3.012s (~)0.823s51.64x
🐘 PostgresNitro2.588s (+6.5% 🔺)3.013s (~)0.425s51.94x
🐘 PostgresExpress2.614s (~)3.011s (~)0.397s51.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.089s (+2.9%)4.611s (-1.5%)0.521s51.00x
▲ VercelExpress4.137s (+3.3%)5.030s (+5.6% 🔺)0.893s51.01x
▲ VercelNitro4.245s (+4.3%)5.018s (+1.1%)0.773s51.04x

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

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.674s (+4.1%)7.059s (+4.3%)0.386s51.00x
🌐 RedisNext.js (Turbopack)8.127s (+1.5%)8.335s (-1.3%)0.208s41.22x
🐘 PostgresNext.js (Turbopack)8.922s (-1.4%)9.136s (-1.4%)0.213s41.34x
🐘 PostgresNitro9.014s (+2.2%)9.468s (+4.1%)0.454s41.35x
🐘 PostgresExpress9.107s (~)9.320s (-2.0%)0.212s41.36x
💻 LocalNitro13.492s (-9.4% 🟢)13.637s (-9.1% 🟢)0.145s32.02x
💻 LocalExpress14.003s (+6.2% 🔺)14.303s (+7.3% 🔺)0.300s32.10x
💻 LocalNext.js (Turbopack)14.182s (+2.3%)14.307s (+1.9%)0.125s32.13x
🌐 TursoNext.js (Turbopack)19.983s (~)20.531s (~)0.548s22.99x
🌐 MongoDBNext.js (Turbopack)20.202s (~)20.552s (~)0.350s23.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.339s (+6.6% 🔺)18.002s (+6.7% 🔺)0.663s21.00x
▲ VercelNitro18.321s (+15.8% 🔺)19.158s (+16.8% 🔺)0.837s21.06x
▲ VercelNext.js (Turbopack)18.931s (+19.1% 🔺)19.529s (+20.2% 🔺)0.598s21.09x

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

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.744s (+0.9%)7.020s (+1.4%)0.276s51.00x
🌐 RedisNext.js (Turbopack)8.447s (-2.9%)8.980s (+1.0%)0.533s41.25x
🐘 PostgresExpress9.244s (-8.4% 🟢)9.566s (-6.4% 🟢)0.322s41.37x
🐘 PostgresNitro9.788s (+7.0% 🔺)9.985s (+4.1%)0.197s41.45x
🐘 PostgresNext.js (Turbopack)9.833s (+8.1% 🔺)10.223s (+7.6% 🔺)0.391s31.46x
💻 LocalNitro14.211s (-6.8% 🟢)14.403s (-10.0% 🟢)0.192s32.11x
💻 LocalNext.js (Turbopack)15.074s (+1.1%)15.485s (+3.0%)0.411s22.24x
💻 LocalExpress15.466s (+0.7%)16.030s (+3.5%)0.564s22.29x
🌐 MongoDBNext.js (Turbopack)19.803s (-0.6%)20.025s (-2.5%)0.222s22.94x
🌐 TursoNext.js (Turbopack)20.037s (-1.4%)20.555s (~)0.518s22.97x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.127s (-5.3% 🟢)16.549s (-7.1% 🟢)0.422s21.00x
▲ VercelExpress16.578s (-12.5% 🟢)17.443s (-11.4% 🟢)0.866s21.03x
▲ VercelNext.js (Turbopack)39.338s (+146.2% 🔺)39.640s (+138.2% 🔺)0.302s12.44x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.124s (-1.9%)1.005s (~)0.000s (NaN%)1.010s (~)0.887s101.00x
💻 LocalNext.js (Turbopack)0.131s (-3.9%)1.003s (~)0.015s (-3.8%)1.025s (~)0.894s101.06x
🌐 RedisNext.js (Turbopack)0.142s (~)1.005s (~)0.000s (NaN%)1.014s (~)0.872s101.15x
💻 LocalNitro0.173s (-3.3%)0.992s (~)0.013s (-12.0% 🟢)1.019s (~)0.846s101.40x
💻 LocalExpress0.180s (-1.4%)0.991s (~)0.016s (+17.4% 🔺)1.023s (~)0.843s101.46x
🌐 TursoNext.js (Turbopack)0.500s (-2.2%)0.952s (+1.1%)0.000s (-100.0% 🟢)1.013s (~)0.512s104.04x
🌐 MongoDBNext.js (Turbopack)0.521s (+1.6%)0.928s (-1.2%)0.000s (-100.0% 🟢)1.012s (~)0.491s104.21x
🐘 PostgresNext.js (Turbopack)0.893s (+36.5% 🔺)0.999s (+9.4% 🔺)0.000s (-70.0% 🟢)1.216s (+19.8% 🔺)0.323s107.21x
🐘 PostgresNitro1.470s (-33.9% 🟢)2.018s (-28.5% 🟢)0.000s (NaN%)2.213s (-26.6% 🟢)0.743s1011.87x
🐘 PostgresExpress2.260s (+5.1% 🔺)2.785s (+3.0%)0.000s (NaN%)3.015s (+3.4%)0.755s1018.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.759s (+4.2%)3.223s (-0.7%)0.384s (+0.7%)4.020s (-0.9%)1.261s101.00x
▲ VercelExpress2.867s (+12.2% 🔺)3.212s (+1.2%)1.059s (+508.0% 🔺)4.777s (+26.7% 🔺)1.910s101.04x
▲ VercelNitro3.056s (+13.1% 🔺)3.528s (+8.2% 🔺)0.471s (+53.4% 🔺)4.494s (+11.7% 🔺)1.438s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNext.js (Turbopack)4/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter6/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@vercelvercelBot 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.

Additional Suggestion:

The JSDoc comment for the probePort function is outdated and doesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.

View Details
📝 Patch Details
diff --git a/packages/utils/src/get-port.ts b/packages/utils/src/get-port.ts
index d4c4a28..24dca4a 100644
--- a/packages/utils/src/get-port.ts+++ b/packages/utils/src/get-port.ts@@ -248,7 +248,7 @@ export interface ProbeOptions {
* Probes a port to check if it's serving the workflow HTTP server.
* Uses HEAD request to minimize overhead.
*
- * @returns true if the port responds as a workflow server (non-404 response)+ * @returns true if the port responds with a 200 status from the health check endpoint
*/
async function probePort(
port: number,

Analysis

Outdated JSDoc comment in probePort() function doesn't match implementation

What fails: The JSDoc comment at line 251 of packages/utils/src/get-port.ts claims the probePort() function @returns true if the port responds as a workflow server (non-404 response), but the actual implementation at line 269 explicitly checks return response.status === 200;

How to reproduce:

  1. Read the JSDoc comment for probePort() function in packages/utils/src/get-port.ts (line 251)
  2. Read the implementation at lines 268-269
  3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200

What happened vs expected behavior:

  • The code behavior was changed in commit 34cb235 (Dec 15, 2025) from checking response.status !== 404 to checking response.status === 200
  • The internal code comments were updated in commit 5840ab2, but the JSDoc was left outdated
  • Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200

Fix: Updated the JSDoc @returns line to accurately reflect the implementation: @returns true if the port responds with a 200 status from the health check endpoint

Verification: All 19 tests in packages/utils/src/get-port.test.ts pass with the updated documentation.

Fix on Vercel

@adriandlamadriandlam changed the title chore: use workflow health endpoint to check for portfix: use workflow health endpoint to check for portDec 16, 2025
…oesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.
This commit fixes the issue reported at packages/utils/src/get-port.ts:251
## Outdated JSDoc comment in probePort() function doesn't match implementation
**What fails:** The JSDoc comment at line 251 of `packages/utils/src/get-port.ts` claims the `probePort()` function `@returns true if the port responds as a workflow server (non-404 response)`, but the actual implementation at line 269 explicitly checks `return response.status === 200;`
**How to reproduce:**
1. Read the JSDoc comment for `probePort()` function in `packages/utils/src/get-port.ts` (line 251)
2. Read the implementation at lines 268-269
3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200
**What happened vs expected behavior:**
- The code behavior was changed in commit `34cb235` (Dec 15, 2025) from checking `response.status !== 404` to checking `response.status === 200`
- The internal code comments were updated in commit `5840ab2`, but the JSDoc was left outdated
- Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200
**Fix:** Updated the JSDoc `@returns` line to accurately reflect the implementation: `@returns true if the port responds with a 200 status from the health check endpoint`
**Verification:** All 19 tests in `packages/utils/src/get-port.test.ts` pass with the updated documentation.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@TooTallNate

Copy link
Copy Markdown
Member

@ijjk Would this cause a problem with the lazy bundling that you're thinking of implementing?

@ijjk

ijjk commented Dec 16, 2025

Copy link
Copy Markdown
Member

This shouldn't cause a conflict with that no

@adriandlam
adriandlam merged commit 1ef6b2f into mainDec 16, 2025
89 of 90 checks passed
@adriandlam
adriandlam deleted the chore/probe-health-endpoint branch December 16, 2025 00:34
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.

3 participants

@adriandlam@TooTallNate@ijjk
, '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

fix: use workflow health endpoint to check for port - #616

Merged
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint
Dec 16, 2025
Merged

fix: use workflow health endpoint to check for port#616
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint

Conversation

@adriandlam

Copy link
Copy Markdown
Contributor

instead of pinging the flow workflow endpoint to check for port and looking for non-404s, we ping the health check endpoint for workflow at http://localhost:${PORT}/.well-known/workflow/v1/flow?__health for 200

@changeset-bot

changeset-botBot commented Dec 15, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa8510e

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

This PR includes changesets to release 17 packages
NameType
@workflow/utilsPatch
@workflow/corePatch
@workflow/errorsPatch
@workflow/world-localPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch

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

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

@vercel

vercelBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 15, 2025

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
🌐 Starter🥇 Next.js (Turbopack)0.038s (-0.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.038s (-5.0%)1.017s (~)0.978s101.01x
🌐 RedisNext.js (Turbopack)0.040s (-3.4%)1.016s (~)0.976s101.05x
💻 LocalNitro0.043s (-0.7%)1.006s (~)0.963s101.14x
💻 LocalExpress0.048s (+9.7% 🔺)1.008s (~)0.960s101.25x
🌐 TursoNext.js (Turbopack)0.109s (+43.5% 🔺)1.013s (~)0.904s102.87x
🌐 MongoDBNext.js (Turbopack)0.128s (+144.6% 🔺)1.014s (~)0.887s103.36x
🐘 PostgresNext.js (Turbopack)0.232s (+78.0% 🔺)1.022s (~)0.790s106.11x
🐘 PostgresNitro0.323s (+50.0% 🔺)1.022s (-1.1%)0.698s108.51x
🐘 PostgresExpress0.355s (+3.4%)1.013s (~)0.658s109.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.561s (-6.6% 🟢)1.462s (-12.4% 🟢)0.901s101.00x
▲ VercelNitro0.563s (-9.9% 🟢)1.692s (+0.6%)1.129s101.00x
▲ VercelExpress0.661s (-17.0% 🟢)1.640s (-7.9% 🟢)0.979s101.18x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.084s (-0.7%)2.011s (~)0.927s101.00x
💻 LocalNext.js (Turbopack)1.096s (~)2.011s (~)0.916s101.01x
🌐 RedisNext.js (Turbopack)1.100s (~)2.012s (~)0.912s101.02x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.03x
💻 LocalExpress1.117s (+0.7%)2.007s (~)0.890s101.03x
🌐 TursoNext.js (Turbopack)1.276s (~)2.013s (~)0.737s101.18x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.012s (~)0.705s101.21x
🐘 PostgresNext.js (Turbopack)1.871s (-3.0%)2.017s (-4.8%)0.146s101.73x
🐘 PostgresNitro2.098s (-14.5% 🟢)3.012s (~)0.913s101.94x
🐘 PostgresExpress2.202s (+0.6%)3.015s (~)0.813s102.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.615s (-3.3%)3.706s (+3.4%)1.091s101.00x
▲ VercelNext.js (Turbopack)2.823s (+1.9%)3.697s (-0.8%)0.874s101.08x
▲ VercelNitro2.868s (+9.3% 🔺)3.730s (+1.4%)0.862s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.570s (~)11.011s (~)0.441s51.00x
💻 LocalNext.js (Turbopack)10.638s (~)11.015s (~)0.377s51.01x
🌐 RedisNext.js (Turbopack)10.665s (~)11.013s (~)0.349s51.01x
💻 LocalNitro10.784s (~)11.012s (~)0.228s51.02x
💻 LocalExpress10.826s (~)11.014s (~)0.188s51.02x
🌐 TursoNext.js (Turbopack)12.187s (~)13.023s (~)0.836s51.15x
🌐 MongoDBNext.js (Turbopack)12.258s (~)13.024s (~)0.766s51.16x
🐘 PostgresNext.js (Turbopack)15.184s (~)16.036s (~)0.853s51.44x
🐘 PostgresExpress20.415s (~)21.035s (~)0.620s51.93x
🐘 PostgresNitro20.474s (+0.7%)21.029s (~)0.555s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)22.213s (+4.2%)22.975s (+3.8%)0.762s51.00x
▲ VercelExpress22.298s (+5.1% 🔺)23.243s (+4.9%)0.946s51.00x
▲ VercelNitro22.365s (+4.2%)22.984s (+2.3%)0.619s51.01x

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

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.336s (-1.0%)2.009s (~)0.674s51.00x
💻 LocalNext.js (Turbopack)1.344s (-1.3%)2.010s (~)0.666s51.01x
🌐 StarterNext.js (Turbopack)1.348s (-1.1%)2.009s (~)0.662s51.01x
💻 LocalNitro1.396s (-1.0%)2.006s (~)0.610s51.04x
💻 LocalExpress1.397s (~)2.007s (~)0.611s51.05x
🐘 PostgresNext.js (Turbopack)1.916s (-13.9% 🟢)2.420s (-19.8% 🟢)0.504s51.43x
🌐 MongoDBNext.js (Turbopack)2.119s (~)3.016s (~)0.897s51.59x
🌐 TursoNext.js (Turbopack)2.188s (-1.1%)3.012s (~)0.823s51.64x
🐘 PostgresNitro2.588s (+6.5% 🔺)3.013s (~)0.425s51.94x
🐘 PostgresExpress2.614s (~)3.011s (~)0.397s51.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.089s (+2.9%)4.611s (-1.5%)0.521s51.00x
▲ VercelExpress4.137s (+3.3%)5.030s (+5.6% 🔺)0.893s51.01x
▲ VercelNitro4.245s (+4.3%)5.018s (+1.1%)0.773s51.04x

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

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.674s (+4.1%)7.059s (+4.3%)0.386s51.00x
🌐 RedisNext.js (Turbopack)8.127s (+1.5%)8.335s (-1.3%)0.208s41.22x
🐘 PostgresNext.js (Turbopack)8.922s (-1.4%)9.136s (-1.4%)0.213s41.34x
🐘 PostgresNitro9.014s (+2.2%)9.468s (+4.1%)0.454s41.35x
🐘 PostgresExpress9.107s (~)9.320s (-2.0%)0.212s41.36x
💻 LocalNitro13.492s (-9.4% 🟢)13.637s (-9.1% 🟢)0.145s32.02x
💻 LocalExpress14.003s (+6.2% 🔺)14.303s (+7.3% 🔺)0.300s32.10x
💻 LocalNext.js (Turbopack)14.182s (+2.3%)14.307s (+1.9%)0.125s32.13x
🌐 TursoNext.js (Turbopack)19.983s (~)20.531s (~)0.548s22.99x
🌐 MongoDBNext.js (Turbopack)20.202s (~)20.552s (~)0.350s23.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.339s (+6.6% 🔺)18.002s (+6.7% 🔺)0.663s21.00x
▲ VercelNitro18.321s (+15.8% 🔺)19.158s (+16.8% 🔺)0.837s21.06x
▲ VercelNext.js (Turbopack)18.931s (+19.1% 🔺)19.529s (+20.2% 🔺)0.598s21.09x

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

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.744s (+0.9%)7.020s (+1.4%)0.276s51.00x
🌐 RedisNext.js (Turbopack)8.447s (-2.9%)8.980s (+1.0%)0.533s41.25x
🐘 PostgresExpress9.244s (-8.4% 🟢)9.566s (-6.4% 🟢)0.322s41.37x
🐘 PostgresNitro9.788s (+7.0% 🔺)9.985s (+4.1%)0.197s41.45x
🐘 PostgresNext.js (Turbopack)9.833s (+8.1% 🔺)10.223s (+7.6% 🔺)0.391s31.46x
💻 LocalNitro14.211s (-6.8% 🟢)14.403s (-10.0% 🟢)0.192s32.11x
💻 LocalNext.js (Turbopack)15.074s (+1.1%)15.485s (+3.0%)0.411s22.24x
💻 LocalExpress15.466s (+0.7%)16.030s (+3.5%)0.564s22.29x
🌐 MongoDBNext.js (Turbopack)19.803s (-0.6%)20.025s (-2.5%)0.222s22.94x
🌐 TursoNext.js (Turbopack)20.037s (-1.4%)20.555s (~)0.518s22.97x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.127s (-5.3% 🟢)16.549s (-7.1% 🟢)0.422s21.00x
▲ VercelExpress16.578s (-12.5% 🟢)17.443s (-11.4% 🟢)0.866s21.03x
▲ VercelNext.js (Turbopack)39.338s (+146.2% 🔺)39.640s (+138.2% 🔺)0.302s12.44x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.124s (-1.9%)1.005s (~)0.000s (NaN%)1.010s (~)0.887s101.00x
💻 LocalNext.js (Turbopack)0.131s (-3.9%)1.003s (~)0.015s (-3.8%)1.025s (~)0.894s101.06x
🌐 RedisNext.js (Turbopack)0.142s (~)1.005s (~)0.000s (NaN%)1.014s (~)0.872s101.15x
💻 LocalNitro0.173s (-3.3%)0.992s (~)0.013s (-12.0% 🟢)1.019s (~)0.846s101.40x
💻 LocalExpress0.180s (-1.4%)0.991s (~)0.016s (+17.4% 🔺)1.023s (~)0.843s101.46x
🌐 TursoNext.js (Turbopack)0.500s (-2.2%)0.952s (+1.1%)0.000s (-100.0% 🟢)1.013s (~)0.512s104.04x
🌐 MongoDBNext.js (Turbopack)0.521s (+1.6%)0.928s (-1.2%)0.000s (-100.0% 🟢)1.012s (~)0.491s104.21x
🐘 PostgresNext.js (Turbopack)0.893s (+36.5% 🔺)0.999s (+9.4% 🔺)0.000s (-70.0% 🟢)1.216s (+19.8% 🔺)0.323s107.21x
🐘 PostgresNitro1.470s (-33.9% 🟢)2.018s (-28.5% 🟢)0.000s (NaN%)2.213s (-26.6% 🟢)0.743s1011.87x
🐘 PostgresExpress2.260s (+5.1% 🔺)2.785s (+3.0%)0.000s (NaN%)3.015s (+3.4%)0.755s1018.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.759s (+4.2%)3.223s (-0.7%)0.384s (+0.7%)4.020s (-0.9%)1.261s101.00x
▲ VercelExpress2.867s (+12.2% 🔺)3.212s (+1.2%)1.059s (+508.0% 🔺)4.777s (+26.7% 🔺)1.910s101.04x
▲ VercelNitro3.056s (+13.1% 🔺)3.528s (+8.2% 🔺)0.471s (+53.4% 🔺)4.494s (+11.7% 🔺)1.438s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNext.js (Turbopack)4/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter6/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@vercelvercelBot 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.

Additional Suggestion:

The JSDoc comment for the probePort function is outdated and doesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.

View Details
📝 Patch Details
diff --git a/packages/utils/src/get-port.ts b/packages/utils/src/get-port.ts
index d4c4a28..24dca4a 100644
--- a/packages/utils/src/get-port.ts+++ b/packages/utils/src/get-port.ts@@ -248,7 +248,7 @@ export interface ProbeOptions {
* Probes a port to check if it's serving the workflow HTTP server.
* Uses HEAD request to minimize overhead.
*
- * @returns true if the port responds as a workflow server (non-404 response)+ * @returns true if the port responds with a 200 status from the health check endpoint
*/
async function probePort(
port: number,

Analysis

Outdated JSDoc comment in probePort() function doesn't match implementation

What fails: The JSDoc comment at line 251 of packages/utils/src/get-port.ts claims the probePort() function @returns true if the port responds as a workflow server (non-404 response), but the actual implementation at line 269 explicitly checks return response.status === 200;

How to reproduce:

  1. Read the JSDoc comment for probePort() function in packages/utils/src/get-port.ts (line 251)
  2. Read the implementation at lines 268-269
  3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200

What happened vs expected behavior:

  • The code behavior was changed in commit 34cb235 (Dec 15, 2025) from checking response.status !== 404 to checking response.status === 200
  • The internal code comments were updated in commit 5840ab2, but the JSDoc was left outdated
  • Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200

Fix: Updated the JSDoc @returns line to accurately reflect the implementation: @returns true if the port responds with a 200 status from the health check endpoint

Verification: All 19 tests in packages/utils/src/get-port.test.ts pass with the updated documentation.

Fix on Vercel

@adriandlamadriandlam changed the title chore: use workflow health endpoint to check for portfix: use workflow health endpoint to check for portDec 16, 2025
…oesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.
This commit fixes the issue reported at packages/utils/src/get-port.ts:251
## Outdated JSDoc comment in probePort() function doesn't match implementation
**What fails:** The JSDoc comment at line 251 of `packages/utils/src/get-port.ts` claims the `probePort()` function `@returns true if the port responds as a workflow server (non-404 response)`, but the actual implementation at line 269 explicitly checks `return response.status === 200;`
**How to reproduce:**
1. Read the JSDoc comment for `probePort()` function in `packages/utils/src/get-port.ts` (line 251)
2. Read the implementation at lines 268-269
3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200
**What happened vs expected behavior:**
- The code behavior was changed in commit `34cb235` (Dec 15, 2025) from checking `response.status !== 404` to checking `response.status === 200`
- The internal code comments were updated in commit `5840ab2`, but the JSDoc was left outdated
- Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200
**Fix:** Updated the JSDoc `@returns` line to accurately reflect the implementation: `@returns true if the port responds with a 200 status from the health check endpoint`
**Verification:** All 19 tests in `packages/utils/src/get-port.test.ts` pass with the updated documentation.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@TooTallNate

Copy link
Copy Markdown
Member

@ijjk Would this cause a problem with the lazy bundling that you're thinking of implementing?

@ijjk

ijjk commented Dec 16, 2025

Copy link
Copy Markdown
Member

This shouldn't cause a conflict with that no

@adriandlam
adriandlam merged commit 1ef6b2f into mainDec 16, 2025
89 of 90 checks passed
@adriandlam
adriandlam deleted the chore/probe-health-endpoint branch December 16, 2025 00:34
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.

3 participants

@adriandlam@TooTallNate@ijjk
, '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

fix: use workflow health endpoint to check for port - #616

Merged
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint
Dec 16, 2025
Merged

fix: use workflow health endpoint to check for port#616
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint

Conversation

@adriandlam

Copy link
Copy Markdown
Contributor

instead of pinging the flow workflow endpoint to check for port and looking for non-404s, we ping the health check endpoint for workflow at http://localhost:${PORT}/.well-known/workflow/v1/flow?__health for 200

@changeset-bot

changeset-botBot commented Dec 15, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa8510e

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

This PR includes changesets to release 17 packages
NameType
@workflow/utilsPatch
@workflow/corePatch
@workflow/errorsPatch
@workflow/world-localPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch

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

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

@vercel

vercelBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 15, 2025

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
🌐 Starter🥇 Next.js (Turbopack)0.038s (-0.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.038s (-5.0%)1.017s (~)0.978s101.01x
🌐 RedisNext.js (Turbopack)0.040s (-3.4%)1.016s (~)0.976s101.05x
💻 LocalNitro0.043s (-0.7%)1.006s (~)0.963s101.14x
💻 LocalExpress0.048s (+9.7% 🔺)1.008s (~)0.960s101.25x
🌐 TursoNext.js (Turbopack)0.109s (+43.5% 🔺)1.013s (~)0.904s102.87x
🌐 MongoDBNext.js (Turbopack)0.128s (+144.6% 🔺)1.014s (~)0.887s103.36x
🐘 PostgresNext.js (Turbopack)0.232s (+78.0% 🔺)1.022s (~)0.790s106.11x
🐘 PostgresNitro0.323s (+50.0% 🔺)1.022s (-1.1%)0.698s108.51x
🐘 PostgresExpress0.355s (+3.4%)1.013s (~)0.658s109.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.561s (-6.6% 🟢)1.462s (-12.4% 🟢)0.901s101.00x
▲ VercelNitro0.563s (-9.9% 🟢)1.692s (+0.6%)1.129s101.00x
▲ VercelExpress0.661s (-17.0% 🟢)1.640s (-7.9% 🟢)0.979s101.18x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.084s (-0.7%)2.011s (~)0.927s101.00x
💻 LocalNext.js (Turbopack)1.096s (~)2.011s (~)0.916s101.01x
🌐 RedisNext.js (Turbopack)1.100s (~)2.012s (~)0.912s101.02x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.03x
💻 LocalExpress1.117s (+0.7%)2.007s (~)0.890s101.03x
🌐 TursoNext.js (Turbopack)1.276s (~)2.013s (~)0.737s101.18x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.012s (~)0.705s101.21x
🐘 PostgresNext.js (Turbopack)1.871s (-3.0%)2.017s (-4.8%)0.146s101.73x
🐘 PostgresNitro2.098s (-14.5% 🟢)3.012s (~)0.913s101.94x
🐘 PostgresExpress2.202s (+0.6%)3.015s (~)0.813s102.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.615s (-3.3%)3.706s (+3.4%)1.091s101.00x
▲ VercelNext.js (Turbopack)2.823s (+1.9%)3.697s (-0.8%)0.874s101.08x
▲ VercelNitro2.868s (+9.3% 🔺)3.730s (+1.4%)0.862s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.570s (~)11.011s (~)0.441s51.00x
💻 LocalNext.js (Turbopack)10.638s (~)11.015s (~)0.377s51.01x
🌐 RedisNext.js (Turbopack)10.665s (~)11.013s (~)0.349s51.01x
💻 LocalNitro10.784s (~)11.012s (~)0.228s51.02x
💻 LocalExpress10.826s (~)11.014s (~)0.188s51.02x
🌐 TursoNext.js (Turbopack)12.187s (~)13.023s (~)0.836s51.15x
🌐 MongoDBNext.js (Turbopack)12.258s (~)13.024s (~)0.766s51.16x
🐘 PostgresNext.js (Turbopack)15.184s (~)16.036s (~)0.853s51.44x
🐘 PostgresExpress20.415s (~)21.035s (~)0.620s51.93x
🐘 PostgresNitro20.474s (+0.7%)21.029s (~)0.555s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)22.213s (+4.2%)22.975s (+3.8%)0.762s51.00x
▲ VercelExpress22.298s (+5.1% 🔺)23.243s (+4.9%)0.946s51.00x
▲ VercelNitro22.365s (+4.2%)22.984s (+2.3%)0.619s51.01x

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

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.336s (-1.0%)2.009s (~)0.674s51.00x
💻 LocalNext.js (Turbopack)1.344s (-1.3%)2.010s (~)0.666s51.01x
🌐 StarterNext.js (Turbopack)1.348s (-1.1%)2.009s (~)0.662s51.01x
💻 LocalNitro1.396s (-1.0%)2.006s (~)0.610s51.04x
💻 LocalExpress1.397s (~)2.007s (~)0.611s51.05x
🐘 PostgresNext.js (Turbopack)1.916s (-13.9% 🟢)2.420s (-19.8% 🟢)0.504s51.43x
🌐 MongoDBNext.js (Turbopack)2.119s (~)3.016s (~)0.897s51.59x
🌐 TursoNext.js (Turbopack)2.188s (-1.1%)3.012s (~)0.823s51.64x
🐘 PostgresNitro2.588s (+6.5% 🔺)3.013s (~)0.425s51.94x
🐘 PostgresExpress2.614s (~)3.011s (~)0.397s51.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.089s (+2.9%)4.611s (-1.5%)0.521s51.00x
▲ VercelExpress4.137s (+3.3%)5.030s (+5.6% 🔺)0.893s51.01x
▲ VercelNitro4.245s (+4.3%)5.018s (+1.1%)0.773s51.04x

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

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.674s (+4.1%)7.059s (+4.3%)0.386s51.00x
🌐 RedisNext.js (Turbopack)8.127s (+1.5%)8.335s (-1.3%)0.208s41.22x
🐘 PostgresNext.js (Turbopack)8.922s (-1.4%)9.136s (-1.4%)0.213s41.34x
🐘 PostgresNitro9.014s (+2.2%)9.468s (+4.1%)0.454s41.35x
🐘 PostgresExpress9.107s (~)9.320s (-2.0%)0.212s41.36x
💻 LocalNitro13.492s (-9.4% 🟢)13.637s (-9.1% 🟢)0.145s32.02x
💻 LocalExpress14.003s (+6.2% 🔺)14.303s (+7.3% 🔺)0.300s32.10x
💻 LocalNext.js (Turbopack)14.182s (+2.3%)14.307s (+1.9%)0.125s32.13x
🌐 TursoNext.js (Turbopack)19.983s (~)20.531s (~)0.548s22.99x
🌐 MongoDBNext.js (Turbopack)20.202s (~)20.552s (~)0.350s23.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.339s (+6.6% 🔺)18.002s (+6.7% 🔺)0.663s21.00x
▲ VercelNitro18.321s (+15.8% 🔺)19.158s (+16.8% 🔺)0.837s21.06x
▲ VercelNext.js (Turbopack)18.931s (+19.1% 🔺)19.529s (+20.2% 🔺)0.598s21.09x

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

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.744s (+0.9%)7.020s (+1.4%)0.276s51.00x
🌐 RedisNext.js (Turbopack)8.447s (-2.9%)8.980s (+1.0%)0.533s41.25x
🐘 PostgresExpress9.244s (-8.4% 🟢)9.566s (-6.4% 🟢)0.322s41.37x
🐘 PostgresNitro9.788s (+7.0% 🔺)9.985s (+4.1%)0.197s41.45x
🐘 PostgresNext.js (Turbopack)9.833s (+8.1% 🔺)10.223s (+7.6% 🔺)0.391s31.46x
💻 LocalNitro14.211s (-6.8% 🟢)14.403s (-10.0% 🟢)0.192s32.11x
💻 LocalNext.js (Turbopack)15.074s (+1.1%)15.485s (+3.0%)0.411s22.24x
💻 LocalExpress15.466s (+0.7%)16.030s (+3.5%)0.564s22.29x
🌐 MongoDBNext.js (Turbopack)19.803s (-0.6%)20.025s (-2.5%)0.222s22.94x
🌐 TursoNext.js (Turbopack)20.037s (-1.4%)20.555s (~)0.518s22.97x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.127s (-5.3% 🟢)16.549s (-7.1% 🟢)0.422s21.00x
▲ VercelExpress16.578s (-12.5% 🟢)17.443s (-11.4% 🟢)0.866s21.03x
▲ VercelNext.js (Turbopack)39.338s (+146.2% 🔺)39.640s (+138.2% 🔺)0.302s12.44x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.124s (-1.9%)1.005s (~)0.000s (NaN%)1.010s (~)0.887s101.00x
💻 LocalNext.js (Turbopack)0.131s (-3.9%)1.003s (~)0.015s (-3.8%)1.025s (~)0.894s101.06x
🌐 RedisNext.js (Turbopack)0.142s (~)1.005s (~)0.000s (NaN%)1.014s (~)0.872s101.15x
💻 LocalNitro0.173s (-3.3%)0.992s (~)0.013s (-12.0% 🟢)1.019s (~)0.846s101.40x
💻 LocalExpress0.180s (-1.4%)0.991s (~)0.016s (+17.4% 🔺)1.023s (~)0.843s101.46x
🌐 TursoNext.js (Turbopack)0.500s (-2.2%)0.952s (+1.1%)0.000s (-100.0% 🟢)1.013s (~)0.512s104.04x
🌐 MongoDBNext.js (Turbopack)0.521s (+1.6%)0.928s (-1.2%)0.000s (-100.0% 🟢)1.012s (~)0.491s104.21x
🐘 PostgresNext.js (Turbopack)0.893s (+36.5% 🔺)0.999s (+9.4% 🔺)0.000s (-70.0% 🟢)1.216s (+19.8% 🔺)0.323s107.21x
🐘 PostgresNitro1.470s (-33.9% 🟢)2.018s (-28.5% 🟢)0.000s (NaN%)2.213s (-26.6% 🟢)0.743s1011.87x
🐘 PostgresExpress2.260s (+5.1% 🔺)2.785s (+3.0%)0.000s (NaN%)3.015s (+3.4%)0.755s1018.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.759s (+4.2%)3.223s (-0.7%)0.384s (+0.7%)4.020s (-0.9%)1.261s101.00x
▲ VercelExpress2.867s (+12.2% 🔺)3.212s (+1.2%)1.059s (+508.0% 🔺)4.777s (+26.7% 🔺)1.910s101.04x
▲ VercelNitro3.056s (+13.1% 🔺)3.528s (+8.2% 🔺)0.471s (+53.4% 🔺)4.494s (+11.7% 🔺)1.438s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNext.js (Turbopack)4/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter6/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@vercelvercelBot 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.

Additional Suggestion:

The JSDoc comment for the probePort function is outdated and doesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.

View Details
📝 Patch Details
diff --git a/packages/utils/src/get-port.ts b/packages/utils/src/get-port.ts
index d4c4a28..24dca4a 100644
--- a/packages/utils/src/get-port.ts+++ b/packages/utils/src/get-port.ts@@ -248,7 +248,7 @@ export interface ProbeOptions {
* Probes a port to check if it's serving the workflow HTTP server.
* Uses HEAD request to minimize overhead.
*
- * @returns true if the port responds as a workflow server (non-404 response)+ * @returns true if the port responds with a 200 status from the health check endpoint
*/
async function probePort(
port: number,

Analysis

Outdated JSDoc comment in probePort() function doesn't match implementation

What fails: The JSDoc comment at line 251 of packages/utils/src/get-port.ts claims the probePort() function @returns true if the port responds as a workflow server (non-404 response), but the actual implementation at line 269 explicitly checks return response.status === 200;

How to reproduce:

  1. Read the JSDoc comment for probePort() function in packages/utils/src/get-port.ts (line 251)
  2. Read the implementation at lines 268-269
  3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200

What happened vs expected behavior:

  • The code behavior was changed in commit 34cb235 (Dec 15, 2025) from checking response.status !== 404 to checking response.status === 200
  • The internal code comments were updated in commit 5840ab2, but the JSDoc was left outdated
  • Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200

Fix: Updated the JSDoc @returns line to accurately reflect the implementation: @returns true if the port responds with a 200 status from the health check endpoint

Verification: All 19 tests in packages/utils/src/get-port.test.ts pass with the updated documentation.

Fix on Vercel

@adriandlamadriandlam changed the title chore: use workflow health endpoint to check for portfix: use workflow health endpoint to check for portDec 16, 2025
…oesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.
This commit fixes the issue reported at packages/utils/src/get-port.ts:251
## Outdated JSDoc comment in probePort() function doesn't match implementation
**What fails:** The JSDoc comment at line 251 of `packages/utils/src/get-port.ts` claims the `probePort()` function `@returns true if the port responds as a workflow server (non-404 response)`, but the actual implementation at line 269 explicitly checks `return response.status === 200;`
**How to reproduce:**
1. Read the JSDoc comment for `probePort()` function in `packages/utils/src/get-port.ts` (line 251)
2. Read the implementation at lines 268-269
3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200
**What happened vs expected behavior:**
- The code behavior was changed in commit `34cb235` (Dec 15, 2025) from checking `response.status !== 404` to checking `response.status === 200`
- The internal code comments were updated in commit `5840ab2`, but the JSDoc was left outdated
- Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200
**Fix:** Updated the JSDoc `@returns` line to accurately reflect the implementation: `@returns true if the port responds with a 200 status from the health check endpoint`
**Verification:** All 19 tests in `packages/utils/src/get-port.test.ts` pass with the updated documentation.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@TooTallNate

Copy link
Copy Markdown
Member

@ijjk Would this cause a problem with the lazy bundling that you're thinking of implementing?

@ijjk

ijjk commented Dec 16, 2025

Copy link
Copy Markdown
Member

This shouldn't cause a conflict with that no

@adriandlam
adriandlam merged commit 1ef6b2f into mainDec 16, 2025
89 of 90 checks passed
@adriandlam
adriandlam deleted the chore/probe-health-endpoint branch December 16, 2025 00:34
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.

3 participants

@adriandlam@TooTallNate@ijjk
, '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

fix: use workflow health endpoint to check for port - #616

Merged
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint
Dec 16, 2025
Merged

fix: use workflow health endpoint to check for port#616
adriandlam merged 4 commits into
mainfrom
chore/probe-health-endpoint

Conversation

@adriandlam

Copy link
Copy Markdown
Contributor

instead of pinging the flow workflow endpoint to check for port and looking for non-404s, we ping the health check endpoint for workflow at http://localhost:${PORT}/.well-known/workflow/v1/flow?__health for 200

@changeset-bot

changeset-botBot commented Dec 15, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa8510e

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

This PR includes changesets to release 17 packages
NameType
@workflow/utilsPatch
@workflow/corePatch
@workflow/errorsPatch
@workflow/world-localPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch

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

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

@vercel

vercelBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 15, 2025

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
🌐 Starter🥇 Next.js (Turbopack)0.038s (-0.8%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.038s (-5.0%)1.017s (~)0.978s101.01x
🌐 RedisNext.js (Turbopack)0.040s (-3.4%)1.016s (~)0.976s101.05x
💻 LocalNitro0.043s (-0.7%)1.006s (~)0.963s101.14x
💻 LocalExpress0.048s (+9.7% 🔺)1.008s (~)0.960s101.25x
🌐 TursoNext.js (Turbopack)0.109s (+43.5% 🔺)1.013s (~)0.904s102.87x
🌐 MongoDBNext.js (Turbopack)0.128s (+144.6% 🔺)1.014s (~)0.887s103.36x
🐘 PostgresNext.js (Turbopack)0.232s (+78.0% 🔺)1.022s (~)0.790s106.11x
🐘 PostgresNitro0.323s (+50.0% 🔺)1.022s (-1.1%)0.698s108.51x
🐘 PostgresExpress0.355s (+3.4%)1.013s (~)0.658s109.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.561s (-6.6% 🟢)1.462s (-12.4% 🟢)0.901s101.00x
▲ VercelNitro0.563s (-9.9% 🟢)1.692s (+0.6%)1.129s101.00x
▲ VercelExpress0.661s (-17.0% 🟢)1.640s (-7.9% 🟢)0.979s101.18x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.084s (-0.7%)2.011s (~)0.927s101.00x
💻 LocalNext.js (Turbopack)1.096s (~)2.011s (~)0.916s101.01x
🌐 RedisNext.js (Turbopack)1.100s (~)2.012s (~)0.912s101.02x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.03x
💻 LocalExpress1.117s (+0.7%)2.007s (~)0.890s101.03x
🌐 TursoNext.js (Turbopack)1.276s (~)2.013s (~)0.737s101.18x
🌐 MongoDBNext.js (Turbopack)1.307s (~)2.012s (~)0.705s101.21x
🐘 PostgresNext.js (Turbopack)1.871s (-3.0%)2.017s (-4.8%)0.146s101.73x
🐘 PostgresNitro2.098s (-14.5% 🟢)3.012s (~)0.913s101.94x
🐘 PostgresExpress2.202s (+0.6%)3.015s (~)0.813s102.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.615s (-3.3%)3.706s (+3.4%)1.091s101.00x
▲ VercelNext.js (Turbopack)2.823s (+1.9%)3.697s (-0.8%)0.874s101.08x
▲ VercelNitro2.868s (+9.3% 🔺)3.730s (+1.4%)0.862s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.570s (~)11.011s (~)0.441s51.00x
💻 LocalNext.js (Turbopack)10.638s (~)11.015s (~)0.377s51.01x
🌐 RedisNext.js (Turbopack)10.665s (~)11.013s (~)0.349s51.01x
💻 LocalNitro10.784s (~)11.012s (~)0.228s51.02x
💻 LocalExpress10.826s (~)11.014s (~)0.188s51.02x
🌐 TursoNext.js (Turbopack)12.187s (~)13.023s (~)0.836s51.15x
🌐 MongoDBNext.js (Turbopack)12.258s (~)13.024s (~)0.766s51.16x
🐘 PostgresNext.js (Turbopack)15.184s (~)16.036s (~)0.853s51.44x
🐘 PostgresExpress20.415s (~)21.035s (~)0.620s51.93x
🐘 PostgresNitro20.474s (+0.7%)21.029s (~)0.555s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)22.213s (+4.2%)22.975s (+3.8%)0.762s51.00x
▲ VercelExpress22.298s (+5.1% 🔺)23.243s (+4.9%)0.946s51.00x
▲ VercelNitro22.365s (+4.2%)22.984s (+2.3%)0.619s51.01x

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

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.336s (-1.0%)2.009s (~)0.674s51.00x
💻 LocalNext.js (Turbopack)1.344s (-1.3%)2.010s (~)0.666s51.01x
🌐 StarterNext.js (Turbopack)1.348s (-1.1%)2.009s (~)0.662s51.01x
💻 LocalNitro1.396s (-1.0%)2.006s (~)0.610s51.04x
💻 LocalExpress1.397s (~)2.007s (~)0.611s51.05x
🐘 PostgresNext.js (Turbopack)1.916s (-13.9% 🟢)2.420s (-19.8% 🟢)0.504s51.43x
🌐 MongoDBNext.js (Turbopack)2.119s (~)3.016s (~)0.897s51.59x
🌐 TursoNext.js (Turbopack)2.188s (-1.1%)3.012s (~)0.823s51.64x
🐘 PostgresNitro2.588s (+6.5% 🔺)3.013s (~)0.425s51.94x
🐘 PostgresExpress2.614s (~)3.011s (~)0.397s51.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.089s (+2.9%)4.611s (-1.5%)0.521s51.00x
▲ VercelExpress4.137s (+3.3%)5.030s (+5.6% 🔺)0.893s51.01x
▲ VercelNitro4.245s (+4.3%)5.018s (+1.1%)0.773s51.04x

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

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.674s (+4.1%)7.059s (+4.3%)0.386s51.00x
🌐 RedisNext.js (Turbopack)8.127s (+1.5%)8.335s (-1.3%)0.208s41.22x
🐘 PostgresNext.js (Turbopack)8.922s (-1.4%)9.136s (-1.4%)0.213s41.34x
🐘 PostgresNitro9.014s (+2.2%)9.468s (+4.1%)0.454s41.35x
🐘 PostgresExpress9.107s (~)9.320s (-2.0%)0.212s41.36x
💻 LocalNitro13.492s (-9.4% 🟢)13.637s (-9.1% 🟢)0.145s32.02x
💻 LocalExpress14.003s (+6.2% 🔺)14.303s (+7.3% 🔺)0.300s32.10x
💻 LocalNext.js (Turbopack)14.182s (+2.3%)14.307s (+1.9%)0.125s32.13x
🌐 TursoNext.js (Turbopack)19.983s (~)20.531s (~)0.548s22.99x
🌐 MongoDBNext.js (Turbopack)20.202s (~)20.552s (~)0.350s23.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.339s (+6.6% 🔺)18.002s (+6.7% 🔺)0.663s21.00x
▲ VercelNitro18.321s (+15.8% 🔺)19.158s (+16.8% 🔺)0.837s21.06x
▲ VercelNext.js (Turbopack)18.931s (+19.1% 🔺)19.529s (+20.2% 🔺)0.598s21.09x

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

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.744s (+0.9%)7.020s (+1.4%)0.276s51.00x
🌐 RedisNext.js (Turbopack)8.447s (-2.9%)8.980s (+1.0%)0.533s41.25x
🐘 PostgresExpress9.244s (-8.4% 🟢)9.566s (-6.4% 🟢)0.322s41.37x
🐘 PostgresNitro9.788s (+7.0% 🔺)9.985s (+4.1%)0.197s41.45x
🐘 PostgresNext.js (Turbopack)9.833s (+8.1% 🔺)10.223s (+7.6% 🔺)0.391s31.46x
💻 LocalNitro14.211s (-6.8% 🟢)14.403s (-10.0% 🟢)0.192s32.11x
💻 LocalNext.js (Turbopack)15.074s (+1.1%)15.485s (+3.0%)0.411s22.24x
💻 LocalExpress15.466s (+0.7%)16.030s (+3.5%)0.564s22.29x
🌐 MongoDBNext.js (Turbopack)19.803s (-0.6%)20.025s (-2.5%)0.222s22.94x
🌐 TursoNext.js (Turbopack)20.037s (-1.4%)20.555s (~)0.518s22.97x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.127s (-5.3% 🟢)16.549s (-7.1% 🟢)0.422s21.00x
▲ VercelExpress16.578s (-12.5% 🟢)17.443s (-11.4% 🟢)0.866s21.03x
▲ VercelNext.js (Turbopack)39.338s (+146.2% 🔺)39.640s (+138.2% 🔺)0.302s12.44x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.124s (-1.9%)1.005s (~)0.000s (NaN%)1.010s (~)0.887s101.00x
💻 LocalNext.js (Turbopack)0.131s (-3.9%)1.003s (~)0.015s (-3.8%)1.025s (~)0.894s101.06x
🌐 RedisNext.js (Turbopack)0.142s (~)1.005s (~)0.000s (NaN%)1.014s (~)0.872s101.15x
💻 LocalNitro0.173s (-3.3%)0.992s (~)0.013s (-12.0% 🟢)1.019s (~)0.846s101.40x
💻 LocalExpress0.180s (-1.4%)0.991s (~)0.016s (+17.4% 🔺)1.023s (~)0.843s101.46x
🌐 TursoNext.js (Turbopack)0.500s (-2.2%)0.952s (+1.1%)0.000s (-100.0% 🟢)1.013s (~)0.512s104.04x
🌐 MongoDBNext.js (Turbopack)0.521s (+1.6%)0.928s (-1.2%)0.000s (-100.0% 🟢)1.012s (~)0.491s104.21x
🐘 PostgresNext.js (Turbopack)0.893s (+36.5% 🔺)0.999s (+9.4% 🔺)0.000s (-70.0% 🟢)1.216s (+19.8% 🔺)0.323s107.21x
🐘 PostgresNitro1.470s (-33.9% 🟢)2.018s (-28.5% 🟢)0.000s (NaN%)2.213s (-26.6% 🟢)0.743s1011.87x
🐘 PostgresExpress2.260s (+5.1% 🔺)2.785s (+3.0%)0.000s (NaN%)3.015s (+3.4%)0.755s1018.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.759s (+4.2%)3.223s (-0.7%)0.384s (+0.7%)4.020s (-0.9%)1.261s101.00x
▲ VercelExpress2.867s (+12.2% 🔺)3.212s (+1.2%)1.059s (+508.0% 🔺)4.777s (+26.7% 🔺)1.910s101.04x
▲ VercelNitro3.056s (+13.1% 🔺)3.528s (+8.2% 🔺)0.471s (+53.4% 🔺)4.494s (+11.7% 🔺)1.438s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNext.js (Turbopack)4/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter6/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@vercelvercelBot 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.

Additional Suggestion:

The JSDoc comment for the probePort function is outdated and doesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.

View Details
📝 Patch Details
diff --git a/packages/utils/src/get-port.ts b/packages/utils/src/get-port.ts
index d4c4a28..24dca4a 100644
--- a/packages/utils/src/get-port.ts+++ b/packages/utils/src/get-port.ts@@ -248,7 +248,7 @@ export interface ProbeOptions {
* Probes a port to check if it's serving the workflow HTTP server.
* Uses HEAD request to minimize overhead.
*
- * @returns true if the port responds as a workflow server (non-404 response)+ * @returns true if the port responds with a 200 status from the health check endpoint
*/
async function probePort(
port: number,

Analysis

Outdated JSDoc comment in probePort() function doesn't match implementation

What fails: The JSDoc comment at line 251 of packages/utils/src/get-port.ts claims the probePort() function @returns true if the port responds as a workflow server (non-404 response), but the actual implementation at line 269 explicitly checks return response.status === 200;

How to reproduce:

  1. Read the JSDoc comment for probePort() function in packages/utils/src/get-port.ts (line 251)
  2. Read the implementation at lines 268-269
  3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200

What happened vs expected behavior:

  • The code behavior was changed in commit 34cb235 (Dec 15, 2025) from checking response.status !== 404 to checking response.status === 200
  • The internal code comments were updated in commit 5840ab2, but the JSDoc was left outdated
  • Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200

Fix: Updated the JSDoc @returns line to accurately reflect the implementation: @returns true if the port responds with a 200 status from the health check endpoint

Verification: All 19 tests in packages/utils/src/get-port.test.ts pass with the updated documentation.

Fix on Vercel

@adriandlamadriandlam changed the title chore: use workflow health endpoint to check for portfix: use workflow health endpoint to check for portDec 16, 2025
…oesn't match the implementation. It claims the function returns true for "non-404 response" but the code now checks for exactly 200 status.
This commit fixes the issue reported at packages/utils/src/get-port.ts:251
## Outdated JSDoc comment in probePort() function doesn't match implementation
**What fails:** The JSDoc comment at line 251 of `packages/utils/src/get-port.ts` claims the `probePort()` function `@returns true if the port responds as a workflow server (non-404 response)`, but the actual implementation at line 269 explicitly checks `return response.status === 200;`
**How to reproduce:**
1. Read the JSDoc comment for `probePort()` function in `packages/utils/src/get-port.ts` (line 251)
2. Read the implementation at lines 268-269
3. Observe the mismatch: the comment says "non-404 response" but code checks for exactly status 200
**What happened vs expected behavior:**
- The code behavior was changed in commit `34cb235` (Dec 15, 2025) from checking `response.status !== 404` to checking `response.status === 200`
- The internal code comments were updated in commit `5840ab2`, but the JSDoc was left outdated
- Developers reading the JSDoc would incorrectly believe the function accepts any non-404 response (400, 405, etc.) when it actually requires exactly 200
**Fix:** Updated the JSDoc `@returns` line to accurately reflect the implementation: `@returns true if the port responds with a 200 status from the health check endpoint`
**Verification:** All 19 tests in `packages/utils/src/get-port.test.ts` pass with the updated documentation.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@TooTallNate

Copy link
Copy Markdown
Member

@ijjk Would this cause a problem with the lazy bundling that you're thinking of implementing?

@ijjk

ijjk commented Dec 16, 2025

Copy link
Copy Markdown
Member

This shouldn't cause a conflict with that no

@adriandlam
adriandlam merged commit 1ef6b2f into mainDec 16, 2025
89 of 90 checks passed
@adriandlam
adriandlam deleted the chore/probe-health-endpoint branch December 16, 2025 00:34
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.

3 participants

@adriandlam@TooTallNate@ijjk