Repository navigation
Handle empty metadata values in predictive cache files - #92
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
An active finding remains because the parser change lacks a fixture and assertion covering metadata values containing an embedded “=”, leaving a regression risk for that input.
1 open issue
What changed in this PR
Updates predictive cache parsing to support metadata entries with empty values and values containing =, while bumping the application version to 1.2.12.
Changes:
- Limits metadata splitting to the first
=delimiter. - Adds fixture and expectation coverage for empty metadata values.
- Updates the application version in the source and lockfile.
Review note (nit): Add fixture/assertion coverage for metadata values containing an embedded =.
| File | Description |
|---|---|
spec/unit/fixtures/predictive-state/cache1/cn=cheese,ou=Pizza_Teams,dc=kittens,dc=net |
Adds an empty metadata value to the cache fixture. |
spec/unit/entitlements/data/groups/cached_spec.rb |
Verifies empty metadata values load as empty strings. |
lib/version.rb |
Bumps the application version to 1.2.12. |
lib/entitlements/data/groups/cached.rb |
Parses metadata using a bounded split. |
Gemfile.lock |
Synchronizes the locked application version. |
Review effort: Lite (auto)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
6b5902f to
c706324
Compare
|
We have historically never allowed blank metadata because that should be translated as not having the field at all. If you encounter blank metadata how are you treating it? Are you deleting the metadata attribute or are you trying to set it to 🤔 it might make more sense to completely ignore blank metadata. |
This came from a CI failure: a deploy's sync commit briefly wrote |
|
updated to skip blank values |

A predictive cache file containing a metadata line with an empty value (e.g.
metadata_team_maintainers=) causedload_cachesto raisewrong array length ... (expected 2, was 1), failing the whole run.Splitting on the first
=only (split("=", 2)) keeps the empty value as"". It also preserves values that contain=.Also bumps the version to 1.2.13.