Fix CLI health check for Astro/Sveltekit and add debug http logs to world-vercel#1442
Conversation
When DEBUG=workflow:* is set: 1. Runtime emits timing logs for each event page load (page number, event count, ms) and total event loading (total events, pages, ms). 2. World-vercel emits timing logs for every HTTP request to workflow-server (method, endpoint, status code, duration ms). These logs help diagnose performance issues in the V2 inline execution loop, such as slow event loading or high-latency API calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CLI's getEnvVars() function reads a fixed list of env vars but was missing WORKFLOW_LOCAL_BASE_URL. The health check command defaults to port 3000 when this var is absent. Frameworks that use non-standard ports (Astro: 4321, SvelteKit: 5173) need this env var to be read for the health check to connect to the correct port. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 9c390e2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
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 |
| WORKFLOW_VERCEL_PROJECT: env.WORKFLOW_VERCEL_PROJECT || '', | ||
| WORKFLOW_VERCEL_PROJECT_NAME: env.WORKFLOW_VERCEL_PROJECT_NAME || '', | ||
| WORKFLOW_VERCEL_TEAM: env.WORKFLOW_VERCEL_TEAM || '', | ||
| WORKFLOW_LOCAL_BASE_URL: env.WORKFLOW_LOCAL_BASE_URL || '', |
There was a problem hiding this comment.
The CLI's getEnvVars() function reads a fixed list of env vars but was
missing WORKFLOW_LOCAL_BASE_URL. The health check command defaults to
port 3000 when this var is absent. Frameworks that use non-standard
ports (Astro: 4321, SvelteKit: 5173) need this env var to be read
for the health check to connect to the correct port.
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (2 failed)nitro (2 failed):
🐘 Local Postgres (1 failed)fastify-stable (1 failed):
🌍 Community Worlds (55 failed)mongodb (2 failed):
redis (2 failed):
turso (51 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
❌ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
karthikscale3
left a comment
There was a problem hiding this comment.
Review
No functional regressions. All three changes are correct in behavior:
- The env.ts fix resolves a real bug for non-default-port frameworks
- Both debug logging additions are properly gated and don't affect production behavior
- The fetch timing wrapper doesn't alter the request/response flow
The only issue worth raising is the import ordering in world-vercel/src/utils.ts -- the new code should be moved below all imports to maintain code conventions and avoid potential lint failures.
| ): void { | ||
| if (HTTP_DEBUG_ENABLED) { | ||
| console.debug( | ||
| `[workflow:world-vercel:http] ${method} ${endpoint} -> ${status} (${ms}ms)` |
There was a problem hiding this comment.
(although I assumed we already had this 🤷🏼 )
No description provided.