Skip to content

[e2e] Report partial results when the event-log race repro is cut short - #3148

Merged
VaguelySerious merged 2 commits into
mainfrom
peter/repro-partial-results
Jul 28, 2026
Merged

[e2e] Report partial results when the event-log race repro is cut short#3148
VaguelySerious merged 2 commits into
mainfrom
peter/repro-partial-results

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

The event-log race repro job posted "No result file was produced by the latest repro job." on both of its last two runs, discarding every attempt that had completed.

Cause

Two things compounded:

  1. writeResults ran once, after all planned attempts had landed. A job that ends any other way produces no file at all. The always() reporting steps do run on cancellation — they just find nothing.
  2. The vitest timeout was derived from the attempt count: runTimeoutMs * ceil(attempts / concurrency) + 60s = 141 min at the current defaults (1400 attempts, c40, 240s), above the job's own timeout-minutes: 120. So the runner always won the race and vitest never reached its final write.

Fix

  • Wall-clock launch budget. EVENT_LOG_RACE_REPRO_BUDGET_MS (new budget_ms dispatch input, default 75 min) is checked before an attempt is claimed, never mid-attempt — an attempt that has started owns a real workflow run, and abandoning it would report a stuck run the harness itself caused. It is sliced per scenario in proportion to remaining planned attempts, so a truncated run still carries hook-sleep control data instead of dropping the last scenario entirely; a scenario finishing under its slice hands the surplus to the next. The vitest timeout now derives from the budget (budget + runTimeoutMs + 60s = 80 min), so the harness finishes and reports well inside the job cap.
  • Checkpointing. Attempts push into a shared array as they settle and the result file is rewritten at most every 10s, plus once up front. A cancellation or timeout now reports the runs it paid for.
  • Honest rendering. The file carries partial, budgetExhausted and plannedAttempts; the renderer surfaces that in the headline and in the history row (… — partial (N of M planned)) so a short run cannot read as a clean one. --check still gates on regressions in a partial file.

Tests

node --test .github/scripts/render-event-log-race-repro-results.test.js — 12/12, including four new cases: partial metadata passes through buildEntry, a complete file defaults to non-partial, a partial file renders as partial rather than missing, and --check still exits 1 on a regression in a partial file.

Note

Branches that already have repro runs in flight (e.g. #3139) check out their own head SHA, so they need to merge main before this affects their runs.

The repro harness wrote its result file once, after all planned attempts had
landed, and derived its vitest timeout from `runTimeoutMs * ceil(attempts /
concurrency)` — 141 min at the current defaults, above the job's own
`timeout-minutes: 120`. The runner therefore always won the race: the job was
cancelled, the `always()` reporting steps ran, found no file, and posted "No
result file was produced by the latest repro job." Every run that had completed
was discarded.

Three changes:

- The harness now owns a wall-clock launch budget (`EVENT_LOG_RACE_REPRO_BUDGET_MS`,
  default 75 min) checked before an attempt is claimed, never mid-attempt, and
  sliced per scenario so a truncated run still carries `hook-sleep` control data.
  The vitest timeout derives from the budget, so the harness finishes and reports
  before the job cap can fire.
- Results are checkpointed to disk as attempts land (throttled to 10s), so a
  cancellation or timeout still reports the runs it paid for.
- The result file carries `partial` / `budgetExhausted` / `plannedAttempts`, and
  the renderer says so in the headline and the history row rather than letting a
  short run read as a clean one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@VaguelySerious
VaguelySerious requested review from a team and ijjk as code owners July 28, 2026 04:33
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jul 28, 2026 3:37pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jul 28, 2026 3:37pm
example-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-astro-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-express-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-fastify-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-hono-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-nestjs-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-nitro-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workbench-vite-workflow Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jul 28, 2026 3:37pm
workflow-swc-playground Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workflow-tarballs Ready Ready Preview, Comment Jul 28, 2026 3:37pm
workflow-web Ready Ready Preview, Comment Jul 28, 2026 3:37pm

@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0248496

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

❌ Failed E2E Tests

▲ Vercel Production (1 failed)

hono (1 failed):

E2E Test Summary

Summary
Passed Failed Skipped Total
❌ ▲ Vercel Production 1454 1 239 1694
✅ 💻 Local Development 1486 0 208 1694
✅ 📦 Local Production 1621 0 227 1848
✅ 🐘 Local Postgres 1621 0 227 1848
✅ 🪟 Windows 154 0 0 154
✅ 📋 Other 1020 0 212 1232
✅ vercel-multi-region 27 0 0 27
Total 7383 1 1113 8497
Details by Category

❌ ▲ Vercel Production

App Passed Failed Skipped
✅ astro 126 0 28
✅ example 126 0 28
✅ express 126 0 28
✅ fastify 126 0 28
❌ hono 125 1 28
✅ nextjs-turbopack 151 0 3
✅ nextjs-webpack 151 0 3
✅ nitro 126 0 28
✅ nuxt 126 0 28
✅ sveltekit 145 0 9
✅ vite 126 0 28

✅ 💻 Local Development

App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26

✅ 📦 Local Production

App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26

✅ 🐘 Local Postgres

App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26

✅ 🪟 Windows

App Passed Failed Skipped
✅ nextjs-turbopack 154 0 0

✅ 📋 Other

App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 128 0 26
✅ e2e-local-dev-tanstack-start- 128 0 26
✅ e2e-local-postgres-nest-stable 128 0 26
✅ e2e-local-postgres-tanstack-start- 128 0 26
✅ e2e-local-prod-nest-stable 128 0 26
✅ e2e-local-prod-tanstack-start- 128 0 26
✅ e2e-vercel-prod-nest 126 0 28
✅ e2e-vercel-prod-tanstack-start 126 0 28

✅ vercel-multi-region

App Passed Failed Skipped
✅ nextjs-turbopack 27 0 0

📋 View full workflow run

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

📊 Workflow Benchmarks

commit 0248496 · Tue, 28 Jul 2026 15:55:27 GMT · run logs

Backend: vercel · app: nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 1226 (+72%) 🔻 1296 🔴 (+25%) 🔻 1323 🔴 (+24%) 🔻 1420 🔴 (-4.1%) 30
TTFS stream 1235 (+28%) 🔻 1278 🔴 (+27%) 🔻 1281 🔴 (+25%) 🔻 1370 🔴 (+32%) 🔻 30
TTFS hook + stream 559 (+23%) 🔻 1554 🔴 (+20%) 🔻 1614 🔴 (+20%) 🔻 1666 🔴 (+1.4%) 30
STSO 1020 steps (1-20) 170 (-4.0%) 280 🔴 (±0%) 308 🔴 (+6.6%) 334 🔴 (-35%) 💚 19
STSO 1020 steps (101-120) 160 (-13%) 245 🔴 (+4.3%) 290 🔴 (+12%) 351 🔴 (-47%) 💚 19
STSO 1020 steps (1001-1020) 474 (±0%) 599 🔴 (+6.2%) 1034 🔴 (+76%) 🔻 3676 🔴 (+125%) 🔻 19
WO 1020 steps 372472 (-6.5%) 372472 (-6.5%) 372472 (-6.5%) 372472 (-6.5%) 1
SL stream latency 101 (+25%) 🔻 145 🔴 (+2.8%) 151 🔴 (-6.2%) 201 🔴 (-17%) 💚 30
SO stream overhead (text) 98 (-5.8%) 156 (-20%) 💚 168 (-71%) 💚 2341 🔴 (+55%) 🔻 30
SO stream overhead (structured) 105 (-7.9%) 169 (-6.6%) 225 (-1.7%) 526 (±0%) 30
📜 Previous results (1)

8d5f54c

Tue, 28 Jul 2026 04:56:15 GMT · run logs

vercel / nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 1254 (+311%) 🔻 1376 🔴 (+37%) 🔻 1402 🔴 (+29%) 🔻 1463 🔴 (+15%) 🔻 30
TTFS stream 1275 (+35%) 🔻 1380 🔴 (+40%) 🔻 1457 🔴 (+47%) 🔻 1583 🔴 (+36%) 🔻 30
TTFS hook + stream 1345 (+14%) 1657 🔴 (+29%) 🔻 1673 🔴 (+22%) 🔻 1893 🔴 (+33%) 🔻 30
STSO 1020 steps (1-20) 205 (+31%) 🔻 322 🔴 (+45%) 🔻 488 🔴 (+97%) 🔻 495 🔴 (+83%) 🔻 19
STSO 1020 steps (101-120) 215 (+20%) 🔻 293 🔴 (+14%) 345 🔴 (-7.5%) 600 🔴 (+59%) 🔻 19
STSO 1020 steps (1001-1020) 500 (+5.9%) 552 🔴 (+2.0%) 637 🔴 (-6.5%) 664 🔴 (-4.2%) 19
WO 1020 steps 410632 (+9.4%) 410632 (+9.4%) 410632 (+9.4%) 410632 (+9.4%) 1
SL stream latency 112 (+47%) 🔻 162 🔴 (+19%) 🔻 170 🔴 (-8.1%) 428 🔴 (+50%) 🔻 30
SO stream overhead (text) 133 (+29%) 🔻 208 (+14%) 278 (+17%) 🔻 457 (+56%) 🔻 30
SO stream overhead (structured) 148 (+57%) 🔻 200 (+2.0%) 218 (-12%) 250 (-64%) 💚 30
ℹ️ Metric definitions & methodology

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, 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) · SO: stream overhead (end-to-end write+consume time beyond the modelled generation window)

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) · stream overhead (text): writer streams 300 variable-length text token deltas paced at 100/s for 3s (a haiku-size LLM's token throughput) while a parallel reader drains the whole stream; SO is the end-to-end write+consume time beyond the 3s generation window (overhead/backpressure) · stream overhead (structured): same workload as stream overhead (text), but each delta is an AI-SDK-style structured object ({ type: 'text-delta', id, text }) instead of a raw string, so the SO gap vs the text scenario is the added serialization cost

🔴 marks a percentile over its target (within target is left unmarked). Targets (p75/p90/p99, ms) — TTFS 200/300/600 · SL 50/60/125 · SO 250/500/1000 · 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 (clientStart) right before start(), so the CI runner’s request and its path through api.vercel.com sit outside every measured window. TTFS = in-deployment start() → first step body (turbo uses the in-process fast path, non-turbo the dispatch path), and includes the VQS dispatch hop plus any /flow cold start. STSO/WO are measured between step bodies on the deployment. SL is measured inside the workflow (parallel reader/writer steps), so it no longer includes the api.vercel.com read path.

Cold starts are kept in the numbers on purpose — they are part of real bursty-workload latency. The workbench deployment cold-starts the /flow invocation for a large fraction of runs, inflating P75+; the Best column shows the fastest (warm-start) sample for comparison.

Comment thread packages/core/e2e/event-log-race-repro.test.ts Outdated
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious merged commit 62c01d9 into main Jul 28, 2026
17 of 33 checks passed
@VaguelySerious
VaguelySerious deleted the peter/repro-partial-results branch July 28, 2026 15:33
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 62c01d9 (AI decision).

This is tooling work on the label-gated / manually dispatched event-log race repro harness, which is a diagnostic aid for an active investigation on main — it is not a gate on stable being buildable, testable, or releasable, and the empty changeset confirms there is no user-visible impact. Beyond the genuine fix (the vitest timeout was derived from attempt count and exceeded the job's timeout-minutes, so no result file was ever written), the commit adds new capability: a budget_ms dispatch input, a per-scenario wall-clock launch budget, checkpointed result writes, and new partial/budgetExhausted/plannedAttempts reporting fields. It is also written against main-only scenario structure (stepStormAttempts/hookStormAttempts and the current runScenario/testTimeoutMs shape), none of which exists on stable's materially different copy of the harness, so the timeout fix would have to be reimplemented rather than backported — force it via workflow_dispatch if someone wants that specific fix on stable.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

62c01d94b0db7eee4e5823df20b7891054a14edc

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.

1 participant