docs/solutions/workflow-issues/2026-04-15-next-dev-benchmark-readiness-must-warm-and-retry-before-failing.md
The huge-document overlay benchmark had a flaky readiness contract. One run
failed with a missing #v2-huge-blocks control even though the route was
serving 200 responses and the exact same lane passed immediately on rerun.
pnpm bench:replacement:huge-document:overlays:local could fail with:
expect(locator('#v2-huge-blocks')).toHaveValue("1000")GET /examples/huge-document?... 200
responsespage.goto(...) plus one-shot control checks as a real
readiness contract.Harden the benchmark runner instead of touching the example:
about:blank and retryRelevant file:
Verification after the patch:
3-sample run passed1-sample launches passed back to backThe failure was benchmark-runner brittleness, not overlay runtime instability.
Next dev can answer the route while the example surface is still settling. A one-shot readiness assertion turns that harmless warmup lag into a fake perf failure. Warming once and retrying boundedly keeps the lane strict without being stupid.