Skip to content

feat: Add IN condition bracketed-invalid-JSON CSV fallback test#50

Merged
khvn26 merged 1 commit intomainfrom
feat/in-condition/bracketed-invalid-json-csv-fallback
Apr 24, 2026
Merged

feat: Add IN condition bracketed-invalid-JSON CSV fallback test#50
khvn26 merged 1 commit intomainfrom
feat/in-condition/bracketed-invalid-json-csv-fallback

Conversation

@khvn26
Copy link
Copy Markdown
Member

@khvn26 khvn26 commented Apr 24, 2026

Contributes to Flagsmith/flagsmith-python-client#198

  • Adds a test case covering an IN segment condition whose string value looks list-shaped ("[foo,bar]") but isn't valid JSON.
  • Engine implementations should fall back to splitting on commas, so the trait value "[foo" matches one of the CSV tokens.

Covers the case where a segment IN condition's string value starts with
"[" and ends with "]" but is not valid JSON — the engine should fall
back to splitting on commas rather than erroring out.

beep boop
@khvn26 khvn26 requested a review from a team as a code owner April 24, 2026 09:33
@khvn26 khvn26 requested review from gagantrivedi and removed request for a team April 24, 2026 09:33
khvn26 added a commit to Flagsmith/flagsmith-engine that referenced this pull request Apr 24, 2026
 HEAD

Temporary pin so CI can run against the bracketed-invalid-JSON CSV
fallback test case that covers the new `except ValueError` branch in
`_parse_in_values_str`. Will be bumped to the next release tag once
Flagsmith/engine-test-data#50 merges.

beep boop
@khvn26 khvn26 merged commit 9307930 into main Apr 24, 2026
1 check passed
khvn26 added a commit to Flagsmith/flagsmith-engine that referenced this pull request Apr 24, 2026
Moves the submodule off the temporary PR-branch pin to the tagged
release that includes the bracketed-invalid-JSON CSV fallback test
case (Flagsmith/engine-test-data#50).

beep boop
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.

2 participants