feat: configurable protocolTimeout to avoid 180s suite aborts#8
Merged
Conversation
…orts The whole suite runs inside one page.evaluate, so puppeteer's implicit 180000ms protocolTimeout aborts long-but-passing runs on slow CI with no per-test output. Add a protocolTimeout config field (default 300000, 0 = no timeout) and pass it through to puppeteer.launch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When a run aborts with a Puppeteer ProtocolError timeout, print a hint explaining the cause (whole suite runs in one page.evaluate) and how to raise the limit. Default protocolTimeout stays at 300000 (5 min) and remains configurable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
TWD Contract Validation
23 passed · 41 failed · 3 warnings · 1 skipped Failed validations./contracts/users-3.0.json
./contracts/posts-3.1.json
./contracts/products-3.0.json
./contracts/events-3.1.json
|
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.
Problem
twd-cliruns the entire suite inside a singlepage.evaluate, which Puppeteer maps to oneRuntime.callFunctionOnCDP command bound byprotocolTimeout(implicit default 180000 ms). Slow-but-passing suites on CI runners hit that ceiling and abort with no per-test output:The existing
timeoutconfig only feedspage.waitForSelector, so there was no way to raise the protocol ceiling.Changes (Phase 1)
protocolTimeouttoDEFAULT_CONFIG(default300000= 5 min, above Puppeteer's implicit 180s).0means no timeout.puppeteer.launch(...).twd.config.example.json,README.md, andCLAUDE.md.To unblock a slow pipeline, set in
twd.config.json:{ "protocolTimeout": 600000 }Out of scope
Phase 2 from the spec (running tests incrementally instead of one
page.evaluate, with streamed per-test output) is intentionally deferred to a follow-up — it requires a coordinatedtwd-jschange to expose the test list.Tests
npm run test:ci— 200 passing, including config-merge coverage for the new field and arunTeststest for the timeout hint.🤖 Generated with Claude Code