Repository navigation
Reject unknown --browsertime.connectivity.engine values - #4924
Merged
soulgalore merged 1 commit intoOct 26, 2026
Merged
Conversation
The option declares choices external/throttle/humble, but any value was accepted and the run silently used no throttling (exit code 0). Validate the value in validateInput and fail with a clear error. Fixes sitespeedio#4923 (part 1). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thank you @jwcastillo |
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.
Your checklist for a pull request to sitespeed.io
Please review the guidelines for contributing to this repository.
npm testand test linting bynpm run lintDescription
Fixes part 1 of #4923.
--browsertime.connectivity.enginedeclareschoices: ['external', 'throttle', 'humble'], but any value was accepted and the run silently used no throttling with exit code 0 (for example--browsertime.connectivity.engine tc). This adds the check tovalidateInput, so an unknown value now fails with:Tests: new CLI test
CLI should reject an unknown connectivity engine(fails without the change, passes with it).npx ava: 98 tests passed.npx eslinton the changed files: no issues.The second part of the issue (warning when a profile is set but the engine is
external, the default inside Docker) changes behavior, so I left it for discussion in the issue.This pull request was made with assistance from Claude.