Skip to content

Reject unknown --browsertime.connectivity.engine values - #4924

Merged
soulgalore merged 1 commit into
sitespeedio:mainfrom
jwcastillo:validate-connectivity-engine
Oct 26, 2026
Merged

soulgalore merged 1 commit into
sitespeedio:mainfrom
jwcastillo:validate-connectivity-engine

Conversation

@jwcastillo

Copy link
Copy Markdown
Contributor

Your checklist for a pull request to sitespeed.io

Please review the guidelines for contributing to this repository.

Description

Fixes part 1 of #4923.

--browsertime.connectivity.engine declares choices: ['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 to validateInput, so an unknown value now fails with:

Error: Unknown connectivity engine "tc". Choose one of: external, throttle, humble.

Tests: new CLI test CLI should reject an unknown connectivity engine (fails without the change, passes with it). npx ava: 98 tests passed. npx eslint on 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.

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>
@soulgalore
soulgalore merged commit 2371e74 into sitespeedio:main Oct 26, 2026
19 of 20 checks passed
@soulgalore

Copy link
Copy Markdown
Member

Thank you @jwcastillo

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.

2 participants