-
Notifications
You must be signed in to change notification settings - Fork 21
Description
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)
endThis preserves semicolons in metadata values while still stripping inline # comments.