metadata_ lines with semicolons raise ArgumentError: Unparseable semicolon predicate
Summary
The text file parser treats ; as a predicate separator on all lines, including metadata_* lines. When a metadata value contains a semicolon (e.g. metadata_continuing_business_justification), the parser raises:
ArgumentError: Unparseable semicolon predicate "..." in ...
Steps to Reproduce
Create a .txt entitlement file with:
metadata_continuing_business_justification = Need access; required for project work
Run the entitlements CI. The parser calls parsed_predicate on the value required for project work, which fails because it's not a valid predicate expression.
Root Cause
In lib/entitlements/data/groups/calculated/text.rb, the semicolon-predicate bypass only checks for key == "description". Metadata lines have free-form text values (like description) but are not exempted, so their values are split on ; and fed to parsed_predicate.
Proposed Fix
Extend the existing description exemption to also cover metadata_ prefixed keys:
if key == "description" || key.start_with?("metadata_")
result[key][operator] << { key: val }
else
result[key][operator] << parsed_predicate(val)
end
This preserves semicolons in metadata values while still stripping inline # comments.
metadata_lines with semicolons raiseArgumentError: Unparseable semicolon predicateSummary
The text file parser treats
;as a predicate separator on all lines, includingmetadata_*lines. When a metadata value contains a semicolon (e.g.metadata_continuing_business_justification), the parser raises:Steps to Reproduce
Create a
.txtentitlement file with:Run the entitlements CI. The parser calls
parsed_predicateon the valuerequired for project work, which fails because it's not a valid predicate expression.Root Cause
In
lib/entitlements/data/groups/calculated/text.rb, the semicolon-predicate bypass only checks forkey == "description". Metadata lines have free-form text values (likedescription) but are not exempted, so their values are split on;and fed toparsed_predicate.Proposed Fix
Extend the existing
descriptionexemption to also covermetadata_prefixed keys:This preserves semicolons in metadata values while still stripping inline
#comments.