Skip to content

fix(world-vercel): keep large event bodies off busy HTTP/2 connections - #4458

Merged
pranaygp merged 1 commit into
mainfrom
pgp/events-large-body-h1
Sep 28, 2026
Merged

pranaygp merged 1 commit into
mainfrom
pgp/events-large-body-h1

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Problem

Under high flow volume (the ai-gateway content-capture workflow on 2026-09-28), some deliveries stalled for 5–13 minutes and then retried:

  • "Workflow replay exceeded maximum duration (240s)" on runs whose first POST had a body over 1 MiB. That was a run_started carrying a multi-MiB run input, or a large events/batch. In the workflow-server logs these requests never reached the proxy. The same POST was re-sent exactly 300 s later, or the invocation was killed at maxDuration (800 s) without sending anything. Traced runs: wrun_41M3MJAJPY50SGJG99W67P7287 (23 MB run_started), wrun_41M3MH64AE20XC2W8GMV1MRMQM (2.27 MB batch), wrun_41M3MAS0WV20VDYHGXCPRHCTFE (1.45 MB run_started, 28 minutes end to end).
  • GET listEvents failing with ERR_HTTP2_STREAM_ERROR (NGHTTP2_ENHANCE_YOUR_CALM / NGHTTP2_INTERNAL_ERROR from the edge). workflow-server logged these requests as 200. They were never retried in-process, so each one cost a full redelivery.

Root cause

  1. Streamed bodies starve on a busy HTTP/2 connection.

    • The multiplexing interceptor re-buffers bodies only up to 1 MiB, so larger ones reach undici still as an async iterable.
    • undici's client-h2.js busy() holds a streamed body until the connection has zero running streams.
    • client.js _resume then stops dispatching the whole queue behind it.
    • On an instance running many workflows, the shared connection never drains. No timer covers this: headersTimeout only arms once a request reaches a socket.
  2. undici < 7.30.0 leaks a "running" slot on every failed HTTP/2 stream (fixed by the backport of fix: preserve h2 queue on out-of-order completion nodejs/undici#5410 and #5569). After a single peer RST_STREAM, the connection reports running: 1 forever. From then on, no streamed body is ever dispatched on it again. That links the edge resets to the stuck large POSTs. Minimal repro, the same script against each version:

    undici running after one reset 2 MiB streamed POST afterwards
    7.28.0 1 stuck
    7.29.0 (current catalog) 1 stuck
    7.30.0 0 sent

    7.30.0 also makes headersTimeout apply on HTTP/2; before, only bodyTimeout was used for both.

  3. undici's 300 s defaults outlast the 240 s replay budget. A silent stream ran past the replay timeout before it failed.

  4. The events RetryAgent doesn't retry ERR_HTTP2_STREAM_ERROR. It isn't in undici's default errorCodes.

Changes

  • Large bodies go over HTTP/1.1. createH2MultiplexInterceptor(fallback) sends bodies it won't re-buffer (over 1 MiB, or unknown length) to an HTTP/1.1 agent owned by the events dispatcher.
    • Closing or destroying the dispatcher, including retirement by the recycler, releases both pools.
    • h2MultiplexInterceptor is still exported, unchanged, with no fallback.
  • undici catalog 7.29.0 → 7.30.0. This also moves world-local and world-postgres; both get changesets.
  • EVENTS_REQUEST_TIMEOUT_MS = 60_000. Used as headersTimeout/bodyTimeout on both events agents, matching REQUEST_TIMEOUT_MS on the v3 path. It bounds silence, not total duration, so long streamed pages are unaffected.
  • EVENTS_RETRY_AGENT_OPTIONS. undici's default errorCodes plus ERR_HTTP2_STREAM_ERROR. methods stays at undici's default (no POST), so event writes are still never replayed.

Tests

New describe('events dispatcher on a busy HTTP/2 connection'), run against a loopback h2 origin with allowHTTP1:

  • Counterfactual: with the interceptor alone (no fallback), a 2 MiB POST stays pending while another stream is in flight.
  • Fix: createEventsDispatcher sends the same POST over HTTP/1.1 and it completes while the stream is still held.
  • Retry: a GET whose stream the peer resets with ENHANCE_YOUR_CALM is retried and succeeds.
  • No retry for writes: a POST whose stream is reset is not retried.
  • undici pin: after a peer reset the agent reports running: 0. This fails on 7.29.0.
  • Config: both events agents' deadlines are pinned well inside the replay budget.

pnpm vitest run in world-vercel: 766 passed. world-local: 604 passed. tsc --noEmit is clean.

Rollout

ai-gateway (workflow@5.0.0-beta.53) will take this in a version bump instead of setting WORKFLOW_H2_MULTIPLEX=0.

Related: vercel/vqs-server#677 fixes the other half of the stall, where any retry directive waited out the 300 s lease.

🤖 Generated with Claude Code

Event POSTs with bodies over 1 MiB (run_started carrying a multi-MiB run
input, large event batches) could not be re-buffered by the H2
multiplexing interceptor, so undici held them until the connection had
zero in-flight streams and stopped its queue behind them. On busy
instances they hung until the replay budget or maxDuration ran out.

- Send those bodies over an HTTP/1.1 agent instead.
- Upgrade undici to 7.30.0, which fixes the phantom running slot a
  failed HTTP/2 stream left on its connection (nodejs/undici#5410,
  #5569) and honors headersTimeout on HTTP/2.
- Bound events requests with 60s header/body deadlines instead of
  undici's 300s defaults, which outlasted the 240s replay budget.
- Retry event-log reads (GET only) whose stream the peer reset with
  ERR_HTTP2_STREAM_ERROR.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code owner September 28, 2026 20:19
@changeset-bot

changeset-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6e550fe

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

This PR includes changesets to release 19 packages
Name Type
@workflow/world-vercel Patch
@workflow/world-local Patch
@workflow/world-postgres Patch
@workflow/cli Patch
@workflow/core Patch
@workflow/web Patch
@workflow/vitest Patch
workflow Patch
@workflow/world-testing Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/web-shared Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch

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

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

Copilot AI lite review requested due to automatic review settings September 28, 2026 20:19

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
example-nextjs-workflow-turbopack Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
example-nextjs-workflow-webpack Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
example-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-astro-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-express-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-fastify-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-hono-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-nestjs-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-nitro-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-nuxt-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-python-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-sveltekit-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-tanstack-start-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workbench-vite-workflow Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workflow-docs Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workflow-swc-playground Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workflow-tarballs Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC
workflow-web Ready Ready Preview, v0 Sep 28, 2026 8:23pm UTC

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

📊 Workflow Benchmarks

commit 6e550fe · Mon, 28 Sep 2026 20:42:21 GMT · run logs

Backend: vercel · app: nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 2017 (+25%) 🔻 2327 🔴 (+14%) 2352 🔴 (+13%) 2414 🔴 (-1.2%) 30
TTFS stream 1985 (+7.3%) 2312 🔴 (+17%) 🔻 2339 🔴 (+16%) 🔻 2404 🔴 (+12%) 30
TTFS hook + stream 691 (-65%) 💚 2637 🔴 (+16%) 🔻 2662 🔴 (+16%) 🔻 2730 🔴 (+15%) 🔻 30
Fan-out TTFS Promise.all(100 steps) 621 (+7.6%) 884 (+12%) 954 (-13%) 2504 (+4.4%) 10
Fan-out TTLS Promise.all(100 steps) 2229 (+7.0%) 3509 (+20%) 🔻 5717 (+95%) 🔻 10208 (+19%) 🔻 10
STSO 1020 steps (inline) 126 (-19%) 💚 152 (-13%) 170 (-11%) 216 (-4.8%) 1019
WO 1020 steps 154652 (-13%) 154652 (-13%) 154652 (-13%) 154652 (-13%) 1
CRTT first chunk (pooled) 60 (-22%) 💚 96 (-13%) 160 (+5.3%) 220 (+13%) 28

Streams

Scenario CRTT 1st p75 p90 p99 CDV max iters
paced control (100/s, 60B) 85 (-11%) 115 (-36%) 136 (-46%) 225 (-41%) 82.5 (-46%) 10
size sweep (100/s, 160B-12KB) 89.5 (-16%) 126 (-42%) 162 (-57%) 273 (-59%) 100 (-36%) 10
replay gateway-gpt-5.4-nano-2000t (1x) 91 (-1%) 134 (-27%) 158 (-27%) 309 (-13%) 150 (-42%) 3
replay eve-gpt-5.6-sol-2000t (1x) 78.5 (-33%) 115 (-39%) 136 (-41%) 242 (-35%) 212 (-43%) 2
replay eve-gpt-5.6-sol-2000t (2x) 160 (+55%) 141 (-39%) 169 (-44%) 291 (-32%) 206 (-29%) 3
📈 STSO distribution vs main (inline / queue-hop histograms)

1020 steps (inline)

Cumulative STSO time: main 176751ms → this run 152282ms (Δ -24469ms, -14%)

100-150 ms  ░░░░░░░░░░░░░░░░░┃        main   0  this 716  +716
150-200 ms  ██████┃█████████████████  main 949  this 283  -666
200-250 ms  ┃█                        main  63  this  15   -48
250-300 ms  ┃                         main   5  this   3    -2
300-350 ms  ┃                         main   1  this   1    +0
400-450 ms  ┃                         main   1  this   1    +0
📈 CRTT drill-down vs main (RTT distributions & profiles)
variant  RTT 1ms→5s+             avg         p50         p90         p99     n
control  ······█▇▁····   98.8 (-31%)   96 (-27%)  136 (-46%)  225 (-41%)  3000
sweep    ·····▁██▁····  104.3 (-39%)   98 (-33%)  162 (-57%)  273 (-59%)  3000
gw 1x    ·····▁▅█▁····  111.5 (-26%)  110 (-29%)  158 (-27%)  309 (-13%)  5295
eve 1x   ·····▁█▆▁····   95.9 (-40%)   88 (-38%)  136 (-41%)  242 (-35%)  5186
eve 2x   ·····▁▆█▁····  115.6 (-36%)  108 (-39%)  169 (-44%)  291 (-32%)  7779

RTT over stream progress (avg per tenth of stream, bars scaled min→max):

control  █▄▂▅▃▂▁▂▅▇  93–108ms
sweep    █▃▄▄▂▂▂▁▂▂  94–129ms
gw 1x    ▃▃▃▅▅▄▃▁▁█  106–121ms
eve 1x   ▄▃▄▃▁█▆▅▆▂  83–112ms
eve 2x   ▃▁▁▃▃▅▇█▅▄  103–133ms

RTT by chunk size (avg per log size bin, ~160B → ~12KB serialized, bars scaled min→max):

sweep  ▇█▅▅▇▄▁  102–106ms

Delivery jitter over stream progress (avg positive CDV per tenth of stream, bars scaled min→max):

control  ▅▆▅█▂▁▂▂▄▄  26–31ms
sweep    █▅▄▇▆▂▄▂▁▃  40–48ms
gw 1x    ▄▄▃▁▅▆█▃▂▇  30–37ms
eve 1x   ▆▇▅▁▄███▇▄  16–23ms
eve 2x   ▄▄▁▃▆▅▄▂▄█  15–24ms
ℹ️ Metric definitions & methodology

Streams: first-chunk RTT (the stream-open path, before any buffering/backpressure), CRTT percentiles, and worst delivery stall (CDV max). Cells are medians across iterations; per-run values in the artifacts. No 🔴/🟢 marks until targets attach.

The collapsed STSO distribution section above buckets every step gap, split inline (same warm process — pure framework overhead) vs queue-hop (fresh process — dispatch, reinit, replay). █ = main, ┃ = this run, ░ = fill.

The collapsed CRTT drill-down: per-variant RTT histograms (fixed log bins, · = empty) and mean RTT/positive-CDV profile lines over stream progress and chunk size. Histograms, avgs, and profiles merge exactly across runs; p50–p99 are percentile-of-percentiles. Per-index rows live in the artifacts.

Best/P75/P90/P99 deltas compare against the most recent benchmark run on main at the time of this run. 🔻 flags a delta worse than +15%, 💚 one better than −15%.

Metrics — TTFS: time to first step body (in-deployment start() → first step body) · Fan-out TTFS: fan-out time to first step (in-deployment start() → first of the parallel step bodies to complete) · Fan-out TTLS: fan-out time to last step (in-deployment start() → last of the parallel step bodies to complete, i.e. when the Promise.all resolves) · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (whole-run time outside step bodies, in-deployment anchored) · CRTT: chunk round-trip time (per-chunk write → read latency, one clock domain: deployment → stream backend → same deployment) · CDV: chunk delay variation / delivery jitter (inter-arrival gap minus inter-write gap per seq-adjacent pair; skew-free; the row is each run's MAX positive value, so one stall moves it)

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 · Promise.all(100 steps): 100 trivial no-op steps started together in a single Promise.all; Fan-out TTFS is the first of them to complete and Fan-out TTLS the last, both from the in-deployment clientStart, so their gap is the spread the runtime adds across the fan-out · paced control (100/s, 60B): the control: 300 tiny (~60B) deltas metronome-paced at 100/s — zero workload structure, so it reads the transport floor and flush cadence, and disambiguates transport-wide vs workload-specific when a replay row moves · size sweep (100/s, 160B-12KB): same pacing as the control with deltas padded in rotation across seven log-spaced sizes (~160B–12KB) — rotation decouples size from stream position, so it isolates whether chunk size causes latency · replay gateway-gpt-5.4-nano-2000t (1x): raw provider SSE cadence captured at the AI gateway boundary (gpt-5.4-nano, the most popular gateway model; per-token deltas p50 208B = the modal production chunk size), replayed exactly as measured — the typical customer's workload; its CDV is the typical customer's real delivery jitter · replay eve-gpt-5.6-sol-2000t (1x): a captured eve turn (gpt-5.6-sol, the most-used demanding eve model; ~2000 output tokens = production p50 turn length) replayed exactly as measured — eve's envelope protocol re-ships the cumulative message so sizes ramp 142B→13KB; the demanding outlier tenant's reality · replay eve-gpt-5.6-sol-2000t (2x): the same eve capture at 2x — the headroom/stress row; real fast-tier models emit the same chunk sizes at proportionally higher rate, so time compression is a faithful speed model · first chunk (pooled): every run's seq-0 RTT pooled across all stream scenarios — the first chunk precedes any workload differentiation, so pooling samples one shared stream-open path with exact percentiles

Replay cadences (semantic sha256) — eve-gpt-5.6-sol-2000t eaf22f5946e7c61f3c65c7006d550df180cfabd4e706254a09f22aec0cfb420d · gateway-gpt-5.4-nano-2000t 6f24ac518b6b83ff1d0e85a5fe78230db192716d66a7fc6b2fe022752001d041

🔴 marks a percentile over its target (within target is left unmarked). Targets (p75/p90/p99, ms) — TTFS 200/300/600

All timestamps are deployment-side; runs are triggered in-deployment, so the CI runner and api.vercel.com sit outside every measured window. TTFS = start() → first step body (includes dispatch + any cold start); Fan-out TTFS/TTLS = first/last step completion of one Promise.all from the same anchor (the gap is the runtime’s fan-out spread); STSO/WO between step bodies; CRTT inside the workflow (excludes the api.vercel.com read path).

Cold starts stay in the numbers (real bursty-workload latency, inflates P75+); Best is the warm floor.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​undici@​7.28.0 ⏵ 7.30.093100 +21100 +198100

View full report

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

❌ Some tests failed

❌ Failed E2E Tests

▲ Vercel Production (26 failed)

astro-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

astro-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

example-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

example-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

express-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

express-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

fastify-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

fastify-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

hono-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

hono-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nest-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nest-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nextjs-turbopack-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nextjs-turbopack-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nextjs-webpack-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nextjs-webpack-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nitro-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nitro-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nuxt-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nuxt-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

sveltekit-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

sveltekit-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

tanstack-start-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

tanstack-start-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

vite-node (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

vite-quickjs (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

💻 Local Development (1 failed)

nextjs-webpack-stable-node (1 failed):

  • health check (CLI) - workflow health command reports healthy endpoints

vercel-http-transport (6 failed)

example (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

express (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

hono (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nextjs-turbopack (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nitro (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

vite (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

vercel-ws-transport (4 failed)

example (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

express (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

nextjs-turbopack (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

vite (1 failed):

  • createHook({ experimental_force: true }) declines to take a token from a run whose runtime predates involuntary disposal: the claimer gets an ordinary HookConflictError

⚠️ Flaky E2E Tests (passed on retry)

These tests failed at least once and passed on a retry. A recurring entry here is a real race worth investigating.

  • abortReasonWorkflow: abort reason preserved across boundaries (nextjs-webpack · local-dev / local / node / stable)
  • getterStepWorkflow - getter functions with "use step" directive (nextjs-webpack · local-dev / local / node / stable)
  • health check (CLI) - workflow health command reports healthy endpoints (nextjs-webpack · local-dev / local / node / canary)

🛠 Infra Events (absorbed by the harness)

Platform anomalies the e2e harness detected and worked around (e.g. a run the queue never picked up, replaced by a fresh run). Clustered timestamps indicate a backend blip; a steady drip indicates a platform issue worth escalating.

  • cold-start-warmup · suite warmup (tanstack-start) · at 20:26:53Z · abandoned wrun_01M3MV59VK6YBGY95HPXVEM31V
  • run-pickup-stall · hookWorkflow (nuxt) · at 20:27:26Z · abandoned wrun_01M3MV6E12E23YVX5RNC6BNWP6
  • run-pickup-stall · ChainableService.processWithThis - static step methods using this to reference the class (nextjs-webpack) · at 20:35:21Z · abandoned wrun_01M3MVMXNPR007XKXWMC0JXDBH

E2E Test Summary

Summary
Passed Failed Skipped Total
❌ ▲ Vercel Production 3852 26 739 4617
❌ 💻 Local Development 4237 1 550 4788
✅ 📦 Local Production 4238 0 550 4788
✅ 🐘 Local Postgres 4238 0 550 4788
✅ 🪟 Windows 340 0 2 342
✅ 🌐 Cross-language Conformance 68 0 84 152
❌ vercel-http-transport 867 6 153 1026
✅ vercel-multi-region 27 0 0 27
❌ vercel-ws-transport 587 4 93 684
Total 18454 37 2721 21212
Details by Category

❌ ▲ Vercel Production

App Passed Failed Skipped
❌ astro-node 140 1 30
❌ astro-quickjs 140 1 30
❌ example-node 140 1 30
❌ example-quickjs 140 1 30
❌ express-node 140 1 30
❌ express-quickjs 140 1 30
❌ fastify-node 140 1 30
❌ fastify-quickjs 140 1 30
❌ hono-node 140 1 30
❌ hono-quickjs 140 1 30
❌ nest-node 140 1 30
❌ nest-quickjs 140 1 30
❌ nextjs-turbopack-node 167 1 3
❌ nextjs-turbopack-quickjs 167 1 3
❌ nextjs-webpack-node 167 1 3
❌ nextjs-webpack-quickjs 167 1 3
❌ nitro-node 140 1 30
❌ nitro-quickjs 140 1 30
❌ nuxt-node 140 1 30
❌ nuxt-quickjs 140 1 30
✅ python-node 66 0 105
❌ sveltekit-node 159 1 11
❌ sveltekit-quickjs 159 1 11
❌ tanstack-start-node 140 1 30
❌ tanstack-start-quickjs 140 1 30
❌ vite-node 140 1 30
❌ vite-quickjs 140 1 30

❌ 💻 Local Development

App Passed Failed Skipped
✅ astro-stable-node 142 0 29
✅ astro-stable-quickjs 142 0 29
✅ express-stable-node 142 0 29
✅ express-stable-quickjs 142 0 29
✅ fastify-stable-node 142 0 29
✅ fastify-stable-quickjs 142 0 29
✅ hono-stable-node 142 0 29
✅ hono-stable-quickjs 142 0 29
✅ nest-stable-node 142 0 29
✅ nest-stable-quickjs 142 0 29
✅ nextjs-turbopack-canary-node 170 0 1
✅ nextjs-turbopack-canary-quickjs 170 0 1
✅ nextjs-turbopack-stable-node 170 0 1
✅ nextjs-turbopack-stable-quickjs 170 0 1
✅ nextjs-webpack-canary-node 170 0 1
✅ nextjs-webpack-canary-quickjs 170 0 1
❌ nextjs-webpack-stable-node 169 1 1
✅ nextjs-webpack-stable-quickjs 170 0 1
✅ nitro-stable-node 142 0 29
✅ nitro-stable-quickjs 142 0 29
✅ nuxt-stable-node 142 0 29
✅ nuxt-stable-quickjs 142 0 29
✅ sveltekit-stable-node 161 0 10
✅ sveltekit-stable-quickjs 161 0 10
✅ tanstack-start-node 142 0 29
✅ tanstack-start-quickjs 142 0 29
✅ vite-stable-node 142 0 29
✅ vite-stable-quickjs 142 0 29

✅ 📦 Local Production

App Passed Failed Skipped
✅ astro-stable-node 142 0 29
✅ astro-stable-quickjs 142 0 29
✅ express-stable-node 142 0 29
✅ express-stable-quickjs 142 0 29
✅ fastify-stable-node 142 0 29
✅ fastify-stable-quickjs 142 0 29
✅ hono-stable-node 142 0 29
✅ hono-stable-quickjs 142 0 29
✅ nest-stable-node 142 0 29
✅ nest-stable-quickjs 142 0 29
✅ nextjs-turbopack-canary-node 170 0 1
✅ nextjs-turbopack-canary-quickjs 170 0 1
✅ nextjs-turbopack-stable-node 170 0 1
✅ nextjs-turbopack-stable-quickjs 170 0 1
✅ nextjs-webpack-canary-node 170 0 1
✅ nextjs-webpack-canary-quickjs 170 0 1
✅ nextjs-webpack-stable-node 170 0 1
✅ nextjs-webpack-stable-quickjs 170 0 1
✅ nitro-stable-node 142 0 29
✅ nitro-stable-quickjs 142 0 29
✅ nuxt-stable-node 142 0 29
✅ nuxt-stable-quickjs 142 0 29
✅ sveltekit-stable-node 161 0 10
✅ sveltekit-stable-quickjs 161 0 10
✅ tanstack-start-node 142 0 29
✅ tanstack-start-quickjs 142 0 29
✅ vite-stable-node 142 0 29
✅ vite-stable-quickjs 142 0 29

✅ 🐘 Local Postgres

App Passed Failed Skipped
✅ astro-stable-node 142 0 29
✅ astro-stable-quickjs 142 0 29
✅ express-stable-node 142 0 29
✅ express-stable-quickjs 142 0 29
✅ fastify-stable-node 142 0 29
✅ fastify-stable-quickjs 142 0 29
✅ hono-stable-node 142 0 29
✅ hono-stable-quickjs 142 0 29
✅ nest-stable-node 142 0 29
✅ nest-stable-quickjs 142 0 29
✅ nextjs-turbopack-canary-node 170 0 1
✅ nextjs-turbopack-canary-quickjs 170 0 1
✅ nextjs-turbopack-stable-node 170 0 1
✅ nextjs-turbopack-stable-quickjs 170 0 1
✅ nextjs-webpack-canary-node 170 0 1
✅ nextjs-webpack-canary-quickjs 170 0 1
✅ nextjs-webpack-stable-node 170 0 1
✅ nextjs-webpack-stable-quickjs 170 0 1
✅ nitro-stable-node 142 0 29
✅ nitro-stable-quickjs 142 0 29
✅ nuxt-stable-node 142 0 29
✅ nuxt-stable-quickjs 142 0 29
✅ sveltekit-stable-node 161 0 10
✅ sveltekit-stable-quickjs 161 0 10
✅ tanstack-start-node 142 0 29
✅ tanstack-start-quickjs 142 0 29
✅ vite-stable-node 142 0 29
✅ vite-stable-quickjs 142 0 29

✅ 🪟 Windows

App Passed Failed Skipped
✅ nextjs-turbopack-node 170 0 1
✅ nextjs-turbopack-quickjs 170 0 1

✅ 🌐 Cross-language Conformance

App Passed Failed Skipped
✅ python 68 0 84

❌ vercel-http-transport

App Passed Failed Skipped
❌ example 140 1 30
❌ express 140 1 30
❌ hono 140 1 30
❌ nextjs-turbopack 167 1 3
❌ nitro 140 1 30
❌ vite 140 1 30

✅ vercel-multi-region

App Passed Failed Skipped
✅ nextjs-turbopack 27 0 0

❌ vercel-ws-transport

App Passed Failed Skipped
❌ example 140 1 30
❌ express 140 1 30
❌ nextjs-turbopack 167 1 3
❌ vite 140 1 30

📋 View full workflow run

@github-actions

Copy link
Copy Markdown
Contributor
Framework Flow route Step reg. Framework output
hono 265.3 KiB (±0) 96.2 KiB (±0) 1.93 MiB (+3.8 KiB)
nextjs-turbopack 272.8 KiB (±0) 426 B (±0) 925.0 KiB (+2.0 KiB)
About these numbers

Sizes are gzip; parentheses show the change against main.
Flow route and Step reg. gate this job, on raw bytes rather than the gzip shown, at max(2%, 50.0 KiB). Framework output is informational.

6e550fe · run

@github-actions

Copy link
Copy Markdown
Contributor

Sim World

Simulated world deterministic testing for races. Traces

🟠 world-sim scenario book — 1 fail of 42 total

fence=per-spec

scenario outcome events virt replay violations
✅ smoke-no-steps completed 3 0ms ok 0
✅ smoke-one-step completed 6 0ms ok 0
✅ hook-at-step-started completed 12 0ms ok 0
✅ hook-at-step-completed completed 12 0ms ok 0
✅ hook-at-hook-created completed 12 0ms ok 0
✅ deadline-hook-wins completed 7 1.0h ok 0
✅ deadline-expires completed 7 1.0h ok 0
✅ step-vs-timer-early-settlement completed 8 1.0h ok 0
✅ long-sleep completed 11 30.0d ok 0
✅ hook-never-arrives stalled 3 0ms skipped 0
✅ step-retries-twice completed 10 2.0s ok 0
✅ parallel-steps completed 9 0ms ok 0
✅ hook-on-execution-state completed 12 0ms ok 0
✅ peek-hook-before-branch completed 12 0ms ok 0
✅ peek-hook-after-branch completed 12 0ms ok 0
✅ peek-hook-at-registration completed 12 0ms ok 0
✅ race-hook-before-probe completed 12 0ms ok 0
✅ race-hook-after-probe completed 12 0ms ok 0
✅ race-duplicate-delivery completed 13 0ms ok 0
✅ attr-hook-before-step completed 11 0ms ok 0
✅ attr-hook-after-step completed 11 0ms ok 0
✅ attr-from-step-body completed 13 0ms ok 0
✅ fork-hook-after-timeout completed 14 1.0m ok 0
✅ fork-hook-before-timeout completed 14 1.0m ok 0
✅ count-hook-after-timeout completed 17 1.0m ok 0
✅ count-hook-before-timeout completed 20 1.0m ok 0
✅ stale-read-step-count-fork completed 20 1.0m ok 0
✅ stale-read-equal-step-counts completed 14 1.0m ok 0
✅ step-vs-step-fork completed 12 0ms ok 0
✅ step-vs-step-fork-fenced completed 12 0ms ok 0
✅ fence-catches-benign-direction completed 12 5ms ok 0
✅ in-flight-before-decision completed 17 1.0m ok 0
❌ in-flight-before-decision-counted completed 17 1.0m ok 0
✅ in-flight-after-decision completed 19 2.0m ok 0
✅ stale-read-step-count-fork-fenced completed 20 1.0m ok 0
✅ fork-hook-wins completed 13 1.0m ok 0
✅ fork-timeout-wins completed 13 1.0m ok 0
✅ unclaimed-payload-under-fork completed 17 1.0m ok 0
✅ claimed-payload-under-fork completed 17 1.0m ok 0
✅ writers-independent-step-bodies completed 12 0ms ok 0
✅ writers-scripted-tempo completed 12 0ms ok 0
✅ cancel-mid-step cancelled 7 0ms skipped 0

Full trace: world-sim.txt

@pranaygp
pranaygp merged commit 35bc428 into main Sep 28, 2026
145 of 185 checks passed
@pranaygp
pranaygp deleted the pgp/events-large-body-h1 branch September 28, 2026 20:46
github-actions Bot added a commit that referenced this pull request Sep 28, 2026
#4458)

Event POSTs with bodies over 1 MiB (run_started carrying a multi-MiB run
input, large event batches) could not be re-buffered by the H2
multiplexing interceptor, so undici held them until the connection had
zero in-flight streams and stopped its queue behind them. On busy
instances they hung until the replay budget or maxDuration ran out.

- Send those bodies over an HTTP/1.1 agent instead.
- Upgrade undici to 7.30.0, which fixes the phantom running slot a
  failed HTTP/2 stream left on its connection (nodejs/undici#5410,
  #5569) and honors headersTimeout on HTTP/2.
- Bound events requests with 60s header/body deadlines instead of
  undici's 300s defaults, which outlasted the 240s replay budget.
- Retry event-log reads (GET only) whose stream the peer reset with
  ERR_HTTP2_STREAM_ERROR.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #4461. Merge conflicts were resolved by AI — please review carefully. (backport job run)

pranaygp pushed a commit that referenced this pull request Sep 29, 2026
#4458) (#4461)

Event POSTs with bodies over 1 MiB (run_started carrying a multi-MiB run
input, large event batches) could not be re-buffered by the H2
multiplexing interceptor, so undici held them until the connection had
zero in-flight streams and stopped its queue behind them. On busy
instances they hung until the replay budget or maxDuration ran out.

- Send those bodies over an HTTP/1.1 agent instead.
- Upgrade undici to 7.30.0, which fixes the phantom running slot a
  failed HTTP/2 stream left on its connection (nodejs/undici#5410,
  #5569) and honors headersTimeout on HTTP/2.
- Bound events requests with 60s header/body deadlines instead of
  undici's 300s defaults, which outlasted the 240s replay budget.
- Retry event-log reads (GET only) whose stream the peer reset with
  ERR_HTTP2_STREAM_ERROR.

Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview – workflow-docs — 6e550fea Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants