fix(tools): don't charge browser launch against the processing timeout - #5407
Merged
Conversation
marcoscaceres
requested review from
sidvishnoi
and
a balanced review from Copilot
August 19, 2026 09:01
Contributor
There was a problem hiding this comment.
Pull request overview
Separates browser startup time from ReSpec’s document-processing timeout.
Changes:
- Resets the processing timer after Puppeteer launches.
- Adds a dedicated 120-second browser launch timeout.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sidvishnoi
reviewed
Aug 19, 2026
Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>
sidvishnoi
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The timer started before
puppeteer.launch(), so time spent starting the browser was deducted from the caller's timeout, which the option documents as time before processing times out. On a slow CI runner that starved the actual work:page.gotoreceived atimer.remainingof zero and the run died with "Timeout: document.respec.ready didn't resolve in 0ms". That is what recently failed a Validate HTML job.Starting the timer after launch fixes it. With a 5 second delay injected before launch to simulate a cold runner, the budget remaining at navigation goes from 22411ms before this change to 29968ms after, out of 30000ms. At a 30 second launch the old behavior reaches zero, which is the failure.
Launch also had no explicit timeout, so it used puppeteer's 30 second default and surfaced as "Timed out after 30000 ms while waiting for the WS endpoint URL to appear in stdout", which is what recently failed a Headless Tests job. It now gets its own budget, kept separate from processing.