fix: -ac Level:Version rejected — commons-cli 1.6.0 drops the ':' separator - #49
Merged
Conversation
…s the ':' separator
commons-cli 1.6.0 ignores valueSeparator(':') on options built with
optionalArg(true), so "-ac AA:WCAG_2_1" reached EyesFactory.accSettings
as one unsplit token and failed AccessibilityLevel parsing. Broken for
every Level:Version invocation (CLI and GUI) since the repo import.
Split a lone colon-bearing token in accSettings itself: covers both the
CLI and GUI paths, keeps bare -ac working, and stays correct if a later
commons-cli fixes the upstream regression. Regression tests include one
through the real parse chain (getOptions -> DefaultParser -> accSettings).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
-ac AA:WCAG_2_1(and everyLevel:Versionform, including partial:WCAG_2_1) has failed withUnable to parse value ... for enum com.applitools.eyes.AccessibilityLevelsince the repo import: commons-cli 1.6.0 silently ignoresvalueSeparator(':')on options built withoptionalArg(true), so the value reachesEyesFactory.accSettingsas one unsplit token. CLI and GUI are equally affected (both parse viaImageTester.getOptions()). Only a bare level (-ac AA) ever worked.accSettingssplits a lone colon-bearing token itself. Single choke point for both CLI and GUI paths, keeps bare-ac(all defaults) working, and remains correct if a future commons-cli release fixes the upstream regression.Test plan
EyesFactoryTest, written first and observed failing with the exact production error: combined token, partial:WCAG_2_1token, and one through the real parse chain (getOptions()→DefaultParser→accSettings) so the integration itself is guarded.EyesFactoryTest14/14; fullmvn testsuite green (550 tests).AA:WCAG_2_1in the Accessibility field previously returned the 400 above; with the fix the options parse and the run starts.🤖 Generated with Claude Code