Skip to content

fix: -ac Level:Version rejected — commons-cli 1.6.0 drops the ':' separator - #49

Merged
valandi merged 1 commit into
mainfrom
fix/ac-value-separator
Aug 13, 2026
Merged

fix: -ac Level:Version rejected — commons-cli 1.6.0 drops the ':' separator#49
valandi merged 1 commit into
mainfrom
fix/ac-value-separator

Conversation

@valandi

@valandi valandi commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • -ac AA:WCAG_2_1 (and every Level:Version form, including partial :WCAG_2_1) has failed with Unable to parse value ... for enum com.applitools.eyes.AccessibilityLevel since the repo import: commons-cli 1.6.0 silently ignores valueSeparator(':') on options built with optionalArg(true), so the value reaches EyesFactory.accSettings as one unsplit token. CLI and GUI are equally affected (both parse via ImageTester.getOptions()). Only a bare level (-ac AA) ever worked.
  • Fix: accSettings splits 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

  • New regression tests in EyesFactoryTest, written first and observed failing with the exact production error: combined token, partial :WCAG_2_1 token, and one through the real parse chain (getOptions()DefaultParseraccSettings) so the integration itself is guarded.
  • EyesFactoryTest 14/14; full mvn test suite green (550 tests).
  • Verified in the GUI: AA:WCAG_2_1 in the Accessibility field previously returned the 400 above; with the fix the options parse and the run starts.

🤖 Generated with Claude Code

…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>
@valandi
valandi merged commit 870786b into main Aug 13, 2026
13 checks passed
@valandi
valandi deleted the fix/ac-value-separator branch August 13, 2026 16:51
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.

1 participant