fix(world-vercel): append caller User-Agent products instead of discarding them#2998
fix(world-vercel): append caller User-Agent products instead of discarding them#2998ruiconti wants to merge 1 commit into
Conversation
…rding them
getHeaders() unconditionally overwrote the caller's User-Agent with the
world-vercel product string, so SDK embedders (frameworks constructing the
world via createWorld({ headers })) had no way to identify themselves to
workflow-server. Join the caller's products after world-vercel's own, per
the RFC 9110 User-Agent grammar (space-delimited product tokens).
Deliberately joined with joinUserAgentProducts rather than Headers.append():
repeated header values combine with ", ", and a comma glued to a product
token breaks whitespace-delimited User-Agent parsers on the receiving side.
🦋 Changeset detectedLatest commit: fda3aa4 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 Benchmarkscommit Backend:
Avg deltas compare against the most recent benchmark run on Metrics — TTFS: time to first step body (in-deployment start() → first step body, deployment clocks) · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (whole-run time outside step bodies, in-deployment anchored) · SL: stream latency (in-deployment write → read propagation, readAt - writtenAt) Scenarios — step: one trivial no-op step, no stream; no hooks, so the run stays in turbo mode (in-process fast path) · stream: one streaming step; no hooks, so the run stays in turbo mode (in-process fast path) · hook + stream: registers a hook before one step, which exits turbo mode (dispatch path) · 1020 steps: 1020 trivial sequential steps; STSO is measured between consecutive steps in the given step ranges, and WO is the whole-run overhead outside step bodies · stream latency: parallel reader/writer steps on a dedicated stream; SL is the in-deployment write->read propagation (readAt - writtenAt) 🟢/🔴 mark percentiles within/above target. Targets (p75/p90/p99, ms) — TTFS 200/300/600 · SL 50/60/125 · STSO (1-20) 20/30/60 · STSO (101-120) 30/45/90 · STSO (1001-1020) 40/60/120 All metrics are measured from deployment-side timestamps only. Runs are triggered by an in-deployment route that stamps the anchor ( Cold starts are kept in the numbers on purpose — they are part of real bursty-workload latency. The workbench deployment cold-starts the |
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
✅ vercel-multi-region
❌ Some E2E test jobs failed:
Check the workflow run for details. |
getHeaders()overwrites the caller'sUser-Agentwith world-vercel's own product string, so anything embedding the SDK — a framework constructing the world viacreateWorld({ headers })— has no way to identify itself to workflow-server. This appends the caller's products after world-vercel's own:All egress goes through this one
getHeaderschoke point (v3makeRequest, v4 events viagetHttpConfig, queue), so the append covers every request path.The join is a space, not
Headers.append(): repeated header values combine with", ", and a comma glued to a product token breaks whitespace-delimited User-Agent parsers on the receiving side.joinUserAgentProductscarries that constraint in one place.First consumer is eve, which passes its
eve/<version>token throughcreateWorld({ headers })so workflow-server can attribute framework traffic.