Skip to content

fix(tools): don't charge browser launch against the processing timeout - #5407

Merged
sidvishnoi merged 6 commits into
mainfrom
fix/browser-launch-timeout-budget
Aug 21, 2026
Merged

fix(tools): don't charge browser launch against the processing timeout#5407
sidvishnoi merged 6 commits into
mainfrom
fix/browser-launch-timeout-budget

Conversation

@marcoscaceres

Copy link
Copy Markdown
Contributor

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.goto received a timer.remaining of 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.

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.

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.

Comment thread tools/respecDocWriter.js Outdated
Comment thread tools/respecDocWriter.js Outdated
Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>
@sidvishnoi
sidvishnoi enabled auto-merge (squash) August 21, 2026 12:57
@sidvishnoi
sidvishnoi merged commit 9737e05 into main Aug 21, 2026
9 checks passed
@sidvishnoi
sidvishnoi deleted the fix/browser-launch-timeout-budget branch August 21, 2026 12:59
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.

4 participants